예제 #1
0
 // Safe to call even if no Future
 void StopFuture()
 {
     if (m_CapturesFuture != null)
     {
         m_CapturesFuture.Close();
     }
     m_CapturesFuture = null;
 }
예제 #2
0
파일: Model.cs 프로젝트: mikeage/open-brush
 public void CancelAsyncLoad()
 {
     // If we have already created a mesh, we need to destroy it and the gameobject it is on so
     // that we don't leave it orphaned in the heirarchy, and we don't leak meshes.
     if (m_root != null)
     {
         foreach (var mesh in m_root.GetComponentsInChildren <MeshFilter>()
                  .Select(x => x.sharedMesh))
         {
             UObject.Destroy(mesh);
         }
         UObject.Destroy(m_root);
         m_root = null;
     }
     m_stateReader.Close();
 }