示例#1
0
 /// </summary>
 /// Register OnGUI node in editor mode.
 /// </summary>
 void RegisterEditorOnGUI()
 {
     if (!EditorApplication.isPlayingOrWillChangePlaymode)
     {
         if (m_ActionState.onGUINode != null && ((m_ActionState.isRoot && BehaviourWindow.activeState == null) || m_ActionState == BehaviourWindow.activeState))
         {
             GUICallback.ResetCallbacks();
             GUICallback.onGUI += m_ActionState.onGUINode.EditorOnTick;
         }
     }
 }
示例#2
0
        /// <summary>
        /// A Unity callback called when the object goes out of scope.
        /// </summary>
        private void OnDisable()
        {
            BehaviourWindow.activeNodeChanged -= this.ActiveNodeChanged;

            // Unregister the callback for visual debugging
            ActionNode.onNodeTick -= OnNodeTick;

            // Register Update
            if (Application.isPlaying)
            {
                EditorApplication.update -= this.Update;
            }
            else
            {
                GUICallback.ResetCallbacks();
            }
        }