public override void OnInspectorGUI() { if (m_ledgeSettings == null) { m_ledgeSettings = (GlobalLedgeSettings)AssetDatabase.LoadAssetAtPath(m_ledgeSettingsPath, typeof(GlobalLedgeSettings)); } // Assign selection m_target = (Ledge)target; // Apply updates from editor TrimEmptyListEntries(); UpdateEdges(); // All that is seen in the inspector GUILayout.Label("Ledge options", EditorStyles.boldLabel, GUILayout.Width(EditorGUIUtility.currentViewWidth - 19)); DrawGlobalVariableFields(); DrawSettingButtons(); GUILayout.Space(10); GUILayout.Label("Add buttons", EditorStyles.boldLabel, GUILayout.Width(EditorGUIUtility.currentViewWidth - 19)); DrawVertexButtons(); GUILayout.Space(10); GUILayout.Label("View of components in ledge", EditorStyles.boldLabel, GUILayout.Width(EditorGUIUtility.currentViewWidth - 19)); DrawDefaultInspector(); EditorUtility.SetDirty(m_target); }
private void OnEnable() { m_ledgeSettings = (GlobalLedgeSettings)AssetDatabase.LoadAssetAtPath(m_ledgeSettingsPath, typeof(GlobalLedgeSettings)); }