public void DrawInspectorEditor(AIBehaviors fsm) { // Return in case this is null in the middle of the OnGUI calls if (this == null) { return; } SerializedObject stateObject = new SerializedObject(this); bool oldEnabled = GUI.enabled; bool drawEnabled = DrawIsEnabled(stateObject); GUI.enabled = oldEnabled & drawEnabled; EditorGUILayout.Separator(); objectFinder.DrawPlayerTagsSelection(fsm, stateObject, "objectFinder", false); AIBehaviorsTriggersGUI.Draw(stateObject, fsm, "Triggers:", "AIBehaviors_TriggersFoldout"); EditorGUILayout.Separator(); this.DrawAnimationFields(stateObject); DrawFoldouts(stateObject, fsm); DrawStateInspectorEditor(stateObject, fsm); stateObject.ApplyModifiedProperties(); GUI.enabled = oldEnabled; }
public void DrawInspectorGUI(AIBehaviors fsm) { SerializedObject triggerObject = new SerializedObject(this); SerializedProperty property = triggerObject.FindProperty("invertResult"); DrawInspectorProperties(fsm, triggerObject); if (CanInvertResult()) { EditorGUILayout.Separator(); EditorGUILayout.PropertyField(property); } EditorGUILayout.Separator(); objectFinder.DrawPlayerTagsSelection(fsm, triggerObject, "objectFinder", false); triggerObject.ApplyModifiedProperties(); }