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 ShutdownWorld() { System.Console.WriteLine("Shutdown World"); // 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(); } } } foreach (var view in m_sceneViews) { view.Dispose(); } m_ActorMode.Dispose(); m_EventMode.Dispose(); m_persistentLines.Dispose(); m_persistentQuads.Dispose(); }
public void ShutdownWorld() { System.Console.WriteLine("Shutdown World"); // Unload any loaded resources and free all associated memory. WResourceManager.UnloadAllResources(); foreach (var view in m_sceneViews) { view.Dispose(); } m_actorEditor.Dispose(); m_persistentLines.Dispose(); }