/// <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(); }
/// <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; }
/// <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); } }
private void OnActiveContextMenuVisibleChanged(Control activeCM) { NodesCache.Wait(); }