public override void OnInspectorGUI() { if (BTEditorManager.Manager.nodeInspector == null) { EditorGUILayout.LabelField("Behavior Tree", TitleStyle); if (manager.behaviorTree.nodes.Count > 2) { EditorGUILayout.LabelField(string.Format("{0} nodes", manager.behaviorTree.nodes.Count - 1)); } else if (manager.behaviorTree.nodes.Count == 2) { EditorGUILayout.LabelField("Empty"); } else { EditorGUILayout.LabelField("1 node"); } EditorGUILayout.Space(); if (GUILayout.Button("Show Behavior Tree editor")) { BTEditorWindow.ShowWindow(); } } else { manager.nodeInspector.OnInspectorGUI(); } if (GUI.changed) { manager.Dirty(); } }