示例#1
0
 public void Destroy()
 {
     Service.Get <EventManager>().UnregisterObserver(this, EventId.ForceGeometryReload);
     Service.Get <ProjectorManager>().RemoveProjector(this);
     if (this.AssetProcessor != null)
     {
         this.AssetProcessor.UnloadAllAssets(null);
         this.AssetProcessor = null;
     }
     if (this.Renderer != null)
     {
         this.Renderer.Destroy();
         this.Renderer = null;
     }
     if (this.Config != null)
     {
         this.Config.Destroy();
         this.Config = null;
     }
     if (this.ReloadHelper != null)
     {
         this.ReloadHelper.Destroy();
         this.ReloadHelper = null;
     }
 }
示例#2
0
 public void Destroy()
 {
     Service.ProjectorManager.RemoveProjector(this);
     if (this.AssetProcessor != null)
     {
         this.AssetProcessor.UnloadAllAssets(null);
         this.AssetProcessor = null;
     }
     if (this.Renderer != null)
     {
         this.Renderer.Destroy();
         this.Renderer = null;
     }
     if (this.Config != null)
     {
         this.Config.Destroy();
         this.Config = null;
     }
     if (this.ReloadHelper != null)
     {
         this.ReloadHelper.Destroy();
         this.ReloadHelper = null;
     }
 }