// ReSharper disable once UnusedMember.Local void OnDisable() { #if DEBUG if (DebugMode) { Debug.Log("*** OnDisable ***"); } #endif // stop design mode strategy DesignModeStrategy.Stop(); }
/*void Awake() * { * Debug.Log("MainWindow->Awake"); * EditorState.Instance.OnEnableSignal.Connect(OnEnableSlot); * EditorState.Instance.OnDisableSignal.Connect(OnDisableSlot); * }*/ // ReSharper disable once UnusedMember.Local void OnEnable() { IconSetter.SetIcon(this); #if DEBUG if (DebugMode) { Debug.Log("*** OnEnable ***"); } #endif // process the post script creation addition (runs after the compile) //CreatedScriptAdditionProcessor.Instance.Process(); PostCompileScriptProcessor.Instance.Process(); /** * Initialize the PlayModeStateChangeEmitter instance * We are subscribing to it's ChangesAppliedSignal to react when changes applied * so we could then push changes to views (events, children and layout view) * */ PlayModeStateChangeEmitter.Instance.ChangesAppliedSignal.Connect(ChangesAppliedSlot); // a single slot connects only once, i.e. no need to vorry about the duplication HierarchyChangeProcessor.Instance.ChangesProcessedSignal.Connect(HierarchyChangsProcessedSlot); /** * Subscribe to ButtonClickedSignal of the HierarchyViewDecorator * */ HierarchyViewDecorator.Instance.ButtonClickedSignal.Connect(HierarchyWindowButtonClickedSlot); /** * Check prerequisites for displaying play mode overlay * */ if (_initialHierarchyChangeDone) { if (EditorSettings.InspectorEnabled) { OverlayPrerequisitesChecker.Check(); } } //SerializationChangesUpdater.Instance.Process(); /** * 3. Set the flag to false * Will be set to true from within OnHierarchyChange * */ _initialHierarchyChangeDone = false; /** * 4. * */ DesignModeStrategy.Start(); /** * 5. Initialize the toolbox * */ ToolboxInitializer.Initialize(); /** * Selection change * */ EditorState.Instance.SelectionChangeSignal.Connect(SelectionChangeSlot); /** * 6. Subscribes to game-view component double-clicks * */ //DesignerOverlay.DoubleClickSignal.Connect(DoubleClickSlot); /** * Update bounds * */ HandleBounds(_bounds); }