private void OnDestroy() { if (m_instance == this) { m_instance = null; RuntimeEditorApplication.Reset(); EditorsMap.Reset(); } Unsubscribe(); }
private void OnDestroy() { if (Instance == this) { Instance = null; RuntimeEditorApplication.Reset(); } RuntimeEditorApplication.PlaymodeStateChanged -= OnPlaymodeStateChanged; RuntimeEditorApplication.IsOpenedChanged -= OnIsOpenedChanged; RuntimeSelection.SelectionChanged -= OnRuntimeSelectionChanged; RuntimeTools.ToolChanged -= OnRuntimeToolChanged; RuntimeTools.PivotRotationChanged -= OnPivotRotationChanged; RuntimeUndo.RedoCompleted -= OnUndoCompleted; RuntimeUndo.RedoCompleted -= OnRedoCompleted; RuntimeUndo.StateChanged -= OnUndoRedoStateChanged; ExposeToEditor.Awaked -= OnAwaked; ExposeToEditor.Destroyed -= OnDestroyed; }