// Safe to call even if no Future void StopFuture() { if (m_CapturesFuture != null) { m_CapturesFuture.Close(); } m_CapturesFuture = null; }
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(); }