public static void EndInspectorGUI(UnityEngine.Object obj)
 {
     GUILayout.EndVertical();
     if (GUI.changed)
     {
         EditorUtility.SetDirty(obj);
         BehaviorTreesEditor.RepaintAll();
     }
 }
Esempio n. 2
0
 private void Update()
 {
     if (BehaviorTreesEditor.active != null && BehaviorTreesEditor.activeGameObject != null)
     {
         if (EditorApplication.isPlaying)
         {
             _debugProgress += Time.unscaledDeltaTime * 2.5f;
             if (_debugProgress >= 1)
             {
                 _debugProgress = 0;
             }
             BehaviorTreesEditor.RepaintAll();
         }
     }
 }
Esempio n. 3
0
 private void OnPlayModeStateChanged()
 {
     if (EditorApplication.isPlayingOrWillChangePlaymode)
     {
         if (_activeGameObject != null)
         {
             _brain = activeGameObject.GetComponent <Brain>();
             if (_brain != null && _brain.behaviorTrees != null)
             {
                 SelectBehaviorTrees(_brain.behaviorTrees);
             }
         }
         _selection.Clear();
         _decoratorSelection.Clear();
         _serviceSelection.Clear();
         UpdateUnitySelection();
     }
     BehaviorTreesEditor.RepaintAll();
 }