private void OnDestroy()
        {
            if (m_editor != null)
            {
                m_editor.Tools.ToolChanged   -= OnEditorToolChanged;
                m_editor.ActiveWindowChanged -= OnActiveWindowChanged;
            }

            if (m_picker != null)
            {
                m_picker.SelectionChanged -= OnPickerSelectionChanged;
            }

            UnsubscribeEvents();

            if (m_selectionComponentState != null)
            {
                m_selectionComponentState.CanSelect(this, true);
                m_selectionComponentState.IsBoxSelectionEnabled(this, true);
                m_selectionComponentState.CanSelectAll(this, true);
            }

            m_selectionComponentState = null;

            EnableSplineRenderers(false);

            IOC.UnregisterFallback <IMeshDeformerTool>(this);
        }
示例#2
0
        protected override void OnDestroyOverride()
        {
            base.OnDestroyOverride();

            if (m_parentDialog != null)
            {
                m_parentDialog.Ok -= OnOk;
            }

            if (m_toggleAssets != null)
            {
                m_toggleAssets.onValueChanged.RemoveListener(OnAssetsTabSelectionChanged);
            }

            if (m_treeView != null)
            {
                m_treeView.ItemDoubleClick  -= OnItemDoubleClick;
                m_treeView.SelectionChanged -= OnSelectionChanged;
                m_treeView.ItemDataBinding  -= OnItemDataBinding;
            }

            if (m_filter != null)
            {
                m_filter.onValueChanged.RemoveListener(OnFilterValueChanged);
            }

            IOC.UnregisterFallback <ISelectObjectDialog>(this);
        }
 protected override void OnEditorClosed()
 {
     base.OnEditorClosed();
     IOC.UnregisterFallback(m_compiler);
     DestroyScriptManager();
     Unsubscribe();
 }
示例#4
0
        private void Cleanup()
        {
            if (m_editor != null)
            {
                m_editor.Selection.SelectionChanged -= OnEditorSelectionChanged;
            }

            if (m_terrainHandlesSelection != null)
            {
                m_terrainHandlesSelection.Enabled              = false;
                m_terrainHandlesSelection.CreateCustomHandle  -= OnCreateCustomHandle;
                m_terrainHandlesSelection.DestroyCustomHandle -= OnDestroyCustomHandle;
            }

            if (m_state != null)
            {
                if (m_state.CutoutTexture != null)
                {
                    Destroy(m_state.CutoutTexture);
                }
            }

            Disable();

            IOC.UnregisterFallback <ITerrainSelectionHandlesTool>(this);
        }
示例#5
0
        private void OnDestroy()
        {
            if (m_editor != null)
            {
                if (m_editor.Selection != null)
                {
                    m_editor.Selection.SelectionChanged -= OnRuntimeEditorSelectionChanged;
                }

                if (m_editor.Object != null)
                {
                    m_editor.Object.Enabled  -= OnObjectEnabled;
                    m_editor.Object.Disabled -= OnObjectDisabled;
                }
            }

            if (m_selectionOverride != null)
            {
                m_selectionOverride.SelectionChanged -= OnSelectionChanged;
            }

            if (m_graphics != null)
            {
                m_graphics.DestroySharedRenderersCache(m_cache);
            }

            IOC.UnregisterFallback <IOutlineManager>(this);
        }
 private void OnDestroy()
 {
     if (m_editor != null)
     {
         m_editor.SceneLoaded -= OnSceneLoaded;
     }
     IOC.UnregisterFallback <IMaterialPaletteManager>(this);
 }
        protected override void OnDestroyOverride()
        {
            base.OnDestroyOverride();

            IOC.UnregisterFallback(m_registerAssetDB);
            IOC.UnregisterFallback(m_registerIDMap);

            Init();
        }
示例#8
0
 private void OnDestroy()
 {
     if (m_project != null)
     {
         m_project.DeleteCompleted -= OnDeleteProjectItemCompleted;
     }
     IOC.UnregisterFallback <IRuntimeScriptManager>(this);
     UnloadTypes(false);
 }
 protected override void OnDestroyOverride()
 {
     IOC.UnregisterFallback <IEditRuntimeScriptDialog>(this);
     base.OnDestroyOverride();
     if (m_parentDialog != null)
     {
         m_parentDialog.Ok -= OnSave;
     }
 }
 private void OnDestroy()
 {
     IOC.UnregisterFallback <IManualUVEditor>(this);
     if (m_tool != null)
     {
         m_tool.SelectionChanged -= OnSelectionChanged;
         m_tool.ModeChanged      -= OnModeChanged;
     }
 }
        private void OnDestroy()
        {
            Mode = ProBuilderToolMode.Object;

            IOC.UnregisterFallback <IProBuilderTool>(this);

            if (m_rte != null)
            {
                m_rte.ActiveWindowChanged         -= OnActiveWindowChanged;
                m_rte.Tools.PivotModeChanging     -= OnPivotModeChanging;
                m_rte.Tools.PivotModeChanged      -= OnPivotModeChanged;
                m_rte.Tools.PivotRotationChanging -= OnPivotRotationChanging;
                m_rte.Tools.PivotRotationChanged  -= OnPivotRotationChanged;
                m_rte.SceneLoading -= OnSceneLoading;
            }

            UnsubscribeFromEvents();

            if (m_wm != null)
            {
                m_wm.WindowCreated -= OnWindowCreated;
            }

            for (int i = 0; i < m_meshEditors.Length; ++i)
            {
                MonoBehaviour meshEditor = m_meshEditors[i] as MonoBehaviour;
                if (meshEditor != null)
                {
                    Destroy(meshEditor);
                }
            }
            if (m_materialEditor != null)
            {
                Destroy(m_materialEditor as MonoBehaviour);
            }

            if (m_autoUVEditor != null)
            {
                Destroy(m_autoUVEditor as MonoBehaviour);
            }

            if (m_polyShapeEditor != null)
            {
                Destroy(m_polyShapeEditor as MonoBehaviour);
            }

            foreach (RuntimeWindow window in m_rte.Windows)
            {
                if (window.WindowType == RuntimeWindowType.Scene)
                {
                    ResetCullingMask(window);
                }
            }


            m_uv.Changed -= OnUVChanged;
        }
示例#12
0
 protected override void OnDestroyOverride()
 {
     base.OnDestroyOverride();
     Unsubscribe();
     if (Destroyed != null)
     {
         Destroyed(this, EventArgs.Empty);
     }
     IOC.UnregisterFallback <IProjectTree>(this);
 }
 protected override void OnEditorClosed()
 {
     base.OnEditorClosed();
     IOC.UnregisterFallback(InstantiateTerrainProjector);
     IOC.UnregisterFallback(InstantiateTerrainAreaProjector);
     if (m_terrainAreaProjector != null)
     {
         Destroy(m_terrainAreaProjector);
     }
 }
示例#14
0
 private void OnDestroy()
 {
     IOC.UnregisterFallback <ITerrainTool>(this);
     if (m_state != null)
     {
         if (m_state.CutoutTexture != null)
         {
             Destroy(m_state.CutoutTexture);
         }
     }
 }
        private void OnDestroy()
        {
            IOC.UnregisterFallback <ISettingsComponent>(this);

            if (m_wm != null)
            {
                m_wm.AfterLayout     -= OnAfterLayout;
                m_wm.WindowCreated   -= OnWindowCreated;
                m_wm.WindowDestroyed -= OnWindowDestoryed;
            }
        }
示例#16
0
        protected override void OnDestroyOverride()
        {
            base.OnDestroyOverride();
            IOC.UnregisterFallback <IAnimationSelectPropertiesDialog>(this);

            if (m_propertiesTreeView != null)
            {
                m_propertiesTreeView.ItemDataBinding -= OnItemDatabinding;
                m_propertiesTreeView.ItemExpanding   -= OnItemExpanding;
            }
        }
        protected override void OnDestroy()
        {
            base.OnDestroy();
            Destroy(m_pivotPoint.gameObject);

            if (m_editor != null)
            {
                m_editor.Selection.SelectionChanged -= OnEditorSelectionChanged;
            }

            IOC.UnregisterFallback <IMeshEditor>(this);
        }
 protected override void OnDestroy()
 {
     base.OnDestroy();
     IOC.UnregisterFallback <IMeasurementTools>(this);
     if (m_editor != null)
     {
         m_editor.Tools.ToolChanged -= OnToolChanged;
     }
     if (m_settingsComponent != null)
     {
         m_settingsComponent.SystemOfMeasurementChanged -= OnSystemOfMeasurementChanged;
     }
 }
示例#19
0
        protected override void OnEditorClosed()
        {
            base.OnEditorClosed();

            IOC.UnregisterFallback <ITerrainTool>(this);
            if (m_state != null)
            {
                if (m_state.CutoutTexture != null)
                {
                    Destroy(m_state.CutoutTexture);
                }
            }
            DestroyHandles();
        }
示例#20
0
        protected virtual void OnDestroy()
        {
            if (m_listBox != null)
            {
                m_listBox.ItemDataBinding  -= OnItemDataBinding;
                m_listBox.ItemBeginDrag    -= OnItemBeginDrag;
                m_listBox.ItemDragEnter    -= OnItemDragEnter;
                m_listBox.ItemDrag         -= OnItemDrag;
                m_listBox.ItemDragExit     -= OnItemDragExit;
                m_listBox.ItemDrop         -= OnItemDrop;
                m_listBox.ItemEndDrag      -= OnItemEndDrag;
                m_listBox.ItemsRemoving    -= OnItemRemoving;
                m_listBox.ItemsRemoved     -= OnItemRemoved;
                m_listBox.ItemDoubleClick  -= OnItemDoubleClick;
                m_listBox.ItemBeginEdit    -= OnItemBeginEdit;
                m_listBox.ItemEndEdit      -= OnItemEndEdit;
                m_listBox.SelectionChanged -= OnSelectionChanged;
                m_listBox.ItemClick        -= OnItemClick;
                m_listBox.Click            -= OnListBoxClick;
            }

            if (Editor != null)
            {
                if (Editor.Selection != null)
                {
                    Editor.Selection.SelectionChanged -= EditorSelectionChanged;
                }

                if (Editor.Object != null)
                {
                    Editor.Object.NameChanged -= OnNameChanged;
                }
            }

            if (m_projectFolderView != null)
            {
                m_projectFolderView.DragEnterEvent -= OnDragEnter;
                m_projectFolderView.DragLeaveEvent -= OnDragLeave;
                m_projectFolderView.DragEvent      -= OnDrag;
                m_projectFolderView.DropEvent      -= OnDrop;
            }

            if (Destroyed != null)
            {
                Destroyed(this, EventArgs.Empty);
            }


            IOC.UnregisterFallback <IProjectFolder>(this);
        }
        private void OnDestroy()
        {
            if (m_editor != null)
            {
                m_editor.Selection.SelectionChanged -= OnRuntimeEditorSelectionChanged;
            }

            if (m_selectionOverride != null)
            {
                m_selectionOverride.SelectionChanged -= OnSelectionChanged;
            }

            IOC.Unregister("SelectedRenderers", m_cache);
            IOC.UnregisterFallback <IOutlineManager>(this);
        }
示例#22
0
        protected override void OnDestroyOverride()
        {
            base.OnDestroyOverride();
            if (m_parentDialog != null)
            {
                m_parentDialog.Ok -= OnOk;
            }

            if (m_fileBrowser != null)
            {
                m_fileBrowser.DoubleClick -= OnFileBrowserDoubleClick;
            }

            IOC.UnregisterFallback <IOpenFileDialog>(this);
        }
        protected override void OnDestroyOverride()
        {
            base.OnDestroyOverride();
            if (m_parentDialog != null)
            {
                m_parentDialog.Ok -= OnOk;
            }

            if (m_fileBrowser != null)
            {
                m_fileBrowser.DoubleClick      -= OnFileBrowserDoubleClick;
                m_fileBrowser.SelectionChanged -= OnFileBrowserSelectionChanged;
                m_fileBrowser.PathChanged      -= OnPathChanged;
            }

            IOC.UnregisterFallback <ISaveFileDialog>(this);
        }
示例#24
0
        protected override void OnDestroy()
        {
            base.OnDestroy();

            IOC.Unregister <IRTE>(this);
            IOC.UnregisterFallback(this);

            PlaymodeStateChanged       -= OnPlaymodeStateChanged;
            IsOpenedChanged            -= OnIsOpenedChanged;
            Selection.SelectionChanged -= OnRuntimeSelectionChanged;
            Tools.ToolChanged          -= OnRuntimeToolChanged;
            Tools.PivotRotationChanged -= OnPivotRotationChanged;
            Undo.RedoCompleted         -= OnUndoCompleted;
            Undo.RedoCompleted         -= OnRedoCompleted;
            Undo.StateChanged          -= OnUndoRedoStateChanged;
            Object.Awaked    -= OnAwaked;
            Object.Destroyed -= OnDestroyed;
        }
示例#25
0
        protected override void OnDestroyOverride()
        {
            base.OnDestroyOverride();

            if (m_parentDialog != null)
            {
                m_parentDialog.Ok -= OnOk;
            }

            if (m_treeView != null)
            {
                m_treeView.ItemDataBinding  -= OnItemDataBinding;
                m_treeView.ItemExpanding    -= OnItemExpanding;
                m_treeView.SelectionChanged -= OnSelectionChanged;
                m_treeView.ItemDoubleClick  -= OnItemDoubleClick;
            }

            IOC.UnregisterFallback <ISaveAssetDialog>(this);
        }
示例#26
0
        private void OnDestroy()
        {
            IOC.UnregisterFallback <IProBuilderTool>(this);

            if (m_rte != null)
            {
                m_rte.ActiveWindowChanged         -= OnActiveWindowChanged;
                m_rte.Tools.PivotModeChanging     -= OnPivotModeChanging;
                m_rte.Tools.PivotModeChanged      -= OnPivotModeChanged;
                m_rte.Tools.PivotRotationChanging -= OnPivotRotationChanging;
                m_rte.Tools.PivotRotationChanged  -= OnPivotRotationChanged;
                m_rte.SceneLoading -= OnSceneLoading;
            }

            UnsubscribeFromEvents();

            if (m_wm != null)
            {
                m_wm.WindowCreated -= OnWindowCreated;
            }

            for (int i = 0; i < m_meshEditors.Length; ++i)
            {
                MonoBehaviour meshEditor = m_meshEditors[i] as MonoBehaviour;
                if (meshEditor != null)
                {
                    Destroy(meshEditor);
                }
            }
            if (m_materialEditor != null)
            {
                Destroy(m_materialEditor as MonoBehaviour);
            }

            if (m_autoUVEditor != null)
            {
                Destroy(m_autoUVEditor as MonoBehaviour);
            }

            m_uv.Changed -= OnUVChanged;
        }
        protected override void OnDestroyOverride()
        {
            base.OnDestroyOverride();

            if (m_listBox != null)
            {
                m_listBox.ItemDataBinding -= OnItemDataBinding;
                m_listBox.ItemBeginDrag   -= OnItemBeginDrag;
                m_listBox.ItemDragEnter   -= OnItemDragEnter;
                m_listBox.ItemDrag        -= OnItemDrag;
                m_listBox.ItemDragExit    -= OnItemDragExit;
                m_listBox.ItemDrop        -= OnItemDrop;
                m_listBox.ItemEndDrag     -= OnItemEndDrag;
                m_listBox.ItemsRemoving   -= OnItemRemoving;
                m_listBox.ItemsRemoved    -= OnItemRemoved;
                m_listBox.ItemDoubleClick -= OnItemDoubleClick;
                m_listBox.ItemBeginEdit   -= OnItemBeginEdit;
                m_listBox.ItemEndEdit     -= OnItemEndEdit;
                m_listBox.ItemClick       -= OnItemClick;
                m_listBox.Click           -= OnListBoxClick;

                m_listBox.SelectionChanged -= OnSelectionChanged;
            }

            if (Editor != null)
            {
                Editor.Selection.SelectionChanged -= EditorSelectionChanged;
            }

            if (Destroyed != null)
            {
                Destroyed(this, EventArgs.Empty);
            }

            IOC.UnregisterFallback <IProjectFolder>(this);
        }
        protected virtual void OnDestroy()
        {
            if (m_treeView != null)
            {
                m_treeView.SelectionChanged -= OnSelectionChanged;
                m_treeView.ItemDataBinding  -= OnItemDataBinding;
                m_treeView.ItemExpanding    -= OnItemExpanding;
                m_treeView.ItemsRemoving    -= OnItemsRemoving;
                m_treeView.ItemsRemoved     -= OnItemsRemoved;
                m_treeView.ItemBeginEdit    -= OnItemBeginEdit;
                m_treeView.ItemEndEdit      -= OnItemEndEdit;
                m_treeView.ItemBeginDrag    -= OnItemBeginDrag;
                m_treeView.ItemBeginDrop    -= OnItemBeginDrop;
                m_treeView.ItemDragEnter    -= OnItemDragEnter;
                m_treeView.ItemDrag         -= OnItemDrag;
                m_treeView.ItemDragExit     -= OnItemDragExit;
                m_treeView.ItemDrop         -= OnItemDrop;
                m_treeView.ItemEndDrag      -= OnItemEndDrag;
                m_treeView.ItemDoubleClick  -= OnItemDoubleClick;
                m_treeView.ItemClick        -= OnItemClick;
            }

            if (m_projectTreeView != null)
            {
                m_projectTreeView.DragEnterEvent -= OnDragEnter;
                m_projectTreeView.DragLeaveEvent -= OnDragLeave;
                m_projectTreeView.DragEvent      -= OnDrag;
                m_projectTreeView.DropEvent      -= OnDrop;
            }

            if (Destroyed != null)
            {
                Destroyed(this, EventArgs.Empty);
            }
            IOC.UnregisterFallback <IProjectTree>(this);
        }
 private void OnDestroy()
 {
     IOC.UnregisterFallback <IRenderPipelineCameraUtility>(this);
 }
示例#30
0
 private void OnDestroy()
 {
     IOC.UnregisterFallback <IObjectEditorLoader>(this);
 }