public void UnloadMap() { // Clear our Undo/Redo Stack m_undoStack.Clear(); // Clear our array of currently selected objects as well. m_CurrentMode.ClearSelection(); // Unload any loaded resources and free all associated memory. WResourceManager.UnloadAllResources(); // Free collision mesh resources. if (Map != null) { foreach (var scene in Map.SceneList) { foreach (var collisionMesh in scene.GetChildrenOfType <WCollisionMesh>()) { collisionMesh.ReleaseResources(); } } } m_ActorMode.DetailsViewModel.Categories = new System.Collections.Specialized.OrderedDictionary(); m_CollisionMode.Shutdown(); // Clear persistent lines from the last map as well. m_persistentLines.Clear(); m_persistentQuads.Clear(); m_currentMap = null; PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Map")); }
public void UnloadMap() { // Clear our Undo/Redo Stack m_undoStack.Clear(); // Clear our array of currently selected objects as well. m_actorEditor.EditorSelection.ClearSelection(); // Clear persistent lines from the last map as well. m_persistentLines.Clear(); m_currentMap = null; PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Map")); }
public void UnloadMap() { // Clear our Undo/Redo Stack m_undoStack.Clear(); // Clear our array of currently selected objects as well. m_CurrentMode.ClearSelection(); m_ActorMode.DetailsViewModel.Categories = new System.Collections.Specialized.OrderedDictionary(); m_CollisionMode.Shutdown(); // Clear persistent lines from the last map as well. m_persistentLines.Clear(); m_currentMap = null; PropertyChanged.Invoke(this, new PropertyChangedEventArgs("Map")); }