예제 #1
0
 public void OnDisable()
 {
     keyboardState = null;
     graphCamera   = null;
     if (selectionBox != null)
     {
         selectionBox.SelectionPerformed -= HandleBoxSelection;
         selectionBox = null;
     }
 }
예제 #2
0
        public void OnEnable()
        {
            graphCamera   = new GraphCamera();
            keyboardState = new KeyBoardState();
            selectionBox  = new GraphSelectionBox();
            selectionBox.SelectionPerformed += HandleBoxSelection;

            genericMenu = GetGenericMenu();

            if (stateMachineGraph == null)
            {
                stateMachineGraph           = ScriptableObject.CreateInstance <Graph>();
                stateMachineGraph.hideFlags = HideFlags.HideAndDontSave;
            }
            if (stateMachineGraphGUI == null)
            {
                stateMachineGraphGUI = (GetEditor(stateMachineGraph));
            }
        }