Dispose() public method

public Dispose ( ) : void
return void
        void OnDisable()
        {
            if (m_ObjectSelectorReceiver != null)
            {
                m_ObjectSelectorReceiver.OnSelectionClosed(GetCurrentObject());
            }

            if (m_OnObjectSelectorClosed != null)
            {
                m_OnObjectSelectorClosed(GetCurrentObject());
            }

            SendEvent(ObjectSelectorClosedCommand, false);
            if (m_ListArea != null)
            {
                m_StartGridSize.value = m_ListArea.gridSize;
            }

            Undo.CollapseUndoOperations(m_ModalUndoGroup);

            if (s_SharedObjectSelector == this)
            {
                s_SharedObjectSelector = null;
            }
            if (m_EditorCache != null)
            {
                m_EditorCache.Dispose();
            }

            AssetPreview.ClearTemporaryAssetPreviews();
        }
        void OnDisable()
        {
            NotifySelectorClosed(false);
            if (m_ListArea != null)
            {
                m_StartGridSize.value = m_ListArea.gridSize;
            }

            if (s_SharedObjectSelector == this)
            {
                s_SharedObjectSelector = null;
            }
            if (m_EditorCache != null)
            {
                m_EditorCache.Dispose();
            }

            AssetPreview.ClearTemporaryAssetPreviews();
            HierarchyProperty.ClearSceneObjectsFilter();
            m_Debounce?.Dispose();
            m_Debounce = null;
        }
示例#3
0
        void OnDisable()
        {
            NotifySelectorClosed(false);
            if (m_ListArea != null)
            {
                m_StartGridSize.value = m_ListArea.gridSize;
            }

            Undo.CollapseUndoOperations(m_ModalUndoGroup);

            if (s_SharedObjectSelector == this)
            {
                s_SharedObjectSelector = null;
            }
            if (m_EditorCache != null)
            {
                m_EditorCache.Dispose();
            }

            AssetPreview.ClearTemporaryAssetPreviews();

            m_Debounce = null;
        }