public void shutdown()
 {
     sceneViewController.destroyCameras();
     virtualTextureLink.sceneUnloading(scene);
     lightManager.sceneUnloading(scene);
     objectMover.sceneUnloading(scene);
     modelController.destroyModel();
     scene.Dispose();
 }
 /// <summary>
 /// Destroy the currently loaded scene. Does nothing if no scene is loaded.
 /// </summary>
 public void destroyScene()
 {
     if (currentScene != null)
     {
         if (OnSceneUnloading != null)
         {
             OnSceneUnloading.Invoke(this, currentScene);
         }
         currentSimObjects.Dispose();
         currentSimObjects = null;
         currentScene.Dispose();
         currentScene = null;
         if (OnSceneUnloaded != null)
         {
             OnSceneUnloaded.Invoke(this, null);
         }
     }
 }
Exemplo n.º 3
0
 public void destroyScene()
 {
     if (scene != null)
     {
         foreach (DebugInterface debugInterface in controller.PluginManager.DebugInterfaces)
         {
             debugInterface.destroyDebugInterface(controller.PluginManager.RendererPlugin, scene.getDefaultSubScene());
         }
         if (OnSceneUnloading != null)
         {
             OnSceneUnloading.Invoke(this, scene);
         }
         scene.Scope.Dispose();
         scene.Dispose();
         scene = null;
         if (OnSceneUnloaded != null)
         {
             OnSceneUnloaded.Invoke(this, null);
         }
     }
 }