public override void Unload() { UnityEditor.SceneManagement.EditorSceneManager.sceneOpening -= HandleUnitySceneOpening; m_Undo.UndoRedoBatchEnded -= HandleUndoEnded; m_ChangeManager.UnregisterChangeCallback(HandleChanges); foreach (var go in new HashSet <GameObject>(k_References.Values.Select(r => r.transform.root.gameObject))) { Object.DestroyImmediate(go); } k_References.Clear(); k_ComponentCache.Clear(); if (!ReloadingAssemblies) { UnityEditor.SceneManagement.EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single); } }
public void Dispose() { m_ChangeManager.UnregisterChangeCallback(HandleChanges); AssetPostprocessorCallbacks.UnregisterAssetMovedHandlerForType <SceneAsset>(HandleMovedAsset); }
public override void Unload() { m_ChangeManager.UnregisterChangeCallback(HandleChanges); Flush(); m_WorldManager = null; }
public override void Unload() { m_ChangeManager.UnregisterChangeCallback(HandleChanges); m_Undo.UndoRedoBatchStarted -= HandleUndoRedoStarted; m_Undo.UndoRedoBatchEnded -= HandleUndoRedoEnded; }