예제 #1
0
        /// <inheritdoc />
        public override void OnDestroy()
        {
            if (IsDisposing)
            {
                return;
            }
            if (_cmStateMachineMenu != null)
            {
                _cmStateMachineMenu.Dispose();
                _cmStateMachineMenu = null;
            }
            if (_cmStateMachineTransitionMenu != null)
            {
                _cmStateMachineTransitionMenu.Dispose();
                _cmStateMachineTransitionMenu = null;
            }
            if (_isRegisteredForScriptsReload)
            {
                _isRegisteredForScriptsReload      = false;
                ScriptsBuilder.ScriptsReloadBegin -= OnScriptsReloadBegin;
            }
            NodesCache.Wait();

            base.OnDestroy();
        }
예제 #2
0
        /// <inheritdoc />
        protected override void OnShowPrimaryMenu(VisjectCM activeCM, Vector2 location, Box startBox)
        {
            Profiler.BeginEvent("Setup Anim Graph Context Menu");
            NodesCache.Get(activeCM);
            Profiler.EndEvent();

            base.OnShowPrimaryMenu(activeCM, location, startBox);

            activeCM.VisibleChanged += OnActiveContextMenuVisibleChanged;
        }
예제 #3
0
        /// <inheritdoc />
        protected override void OnShowPrimaryMenu(VisjectCM activeCM, Vector2 location, Box startBox)
        {
            // Check if show additional nodes in the current surface context
            if (activeCM != _cmStateMachineMenu)
            {
                Profiler.BeginEvent("Setup Anim Graph Context Menu");
                NodesCache.Get(activeCM);
                Profiler.EndEvent();

                base.OnShowPrimaryMenu(activeCM, location, startBox);

                activeCM.VisibleChanged += OnActiveContextMenuVisibleChanged;
            }
            else
            {
                base.OnShowPrimaryMenu(activeCM, location, startBox);
            }
        }
예제 #4
0
 private void OnActiveContextMenuVisibleChanged(Control activeCM)
 {
     NodesCache.Wait();
 }