public override void OnInspectorGUI() { EditorGUI.BeginChangeCheck(); serializedObject.Update(); EditorUtils.BrandField(); using (new EditorGUI.DisabledScope(true)) EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Script")); ProjectorEditorUtils.BrainInHierarchy(this.me.transform, ref this.brain); ProjectorEditorUtils.BrainField(this.brain); serializedObject.ApplyModifiedProperties(); EditorGUI.EndChangeCheck(); }
public override void OnInspectorGUI() { EditorGUI.BeginChangeCheck(); serializedObject.Update(); EditorUtils.BrandField(); using (new EditorGUI.DisabledScope(true)) EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Script")); ProjectorEditorUtils.BrainInHierarchy(this.me.transform, ref this.brain); ProjectorEditorUtils.BrainField(this.brain); EditorGUILayout.PropertyField(this.configurationProperty); EditorGUI.indentLevel++; if (this.configurationProperty.objectReferenceValue == null) { this.editor = null; } if (this.editor == null && this.configurationProperty.objectReferenceValue != null) { Editor.CreateCachedEditor(this.configurationProperty.objectReferenceValue, null, ref this.editor); } if (this.editor != null) { this.editor.DrawDefaultInspector(); this.editor.serializedObject.ApplyModifiedProperties(); } EditorGUI.indentLevel--; EditorGUILayout.PropertyField(this.planeProperty); if (GUI.changed && this.me.Configuration != null) { this.me.ApplyModificationsToCamera(); } serializedObject.ApplyModifiedProperties(); EditorGUI.EndChangeCheck(); }