private void Start() { MeshClusters.ForEach(x => { if (x != null && x != m_temporaryCluster) { x.SaveStateForPlaymode(); } }); }
internal void ClearGeometry() { MeshClusters.ForEach(x => { if (x != null) { UnloadMeshCluster(x); } }); SoundToolKitManager.Instance.StkAudioEngine.Scene.Clear(); SoundToolKitManager.Instance.ResourceContainer.Geometry = null; }
internal void SerializeGeometry() { MeshClusters.ForEach(x => { if (x != null && x != m_temporaryCluster) { x.Serialize(); } else if (x == m_temporaryCluster) { SoundToolKitDebug.Log("Temporary Mesh Cluster can't be serialized."); } }); }
internal void InitializeMeshClusters() { if (!Initialized && SoundToolKitManager.Instance.ResourceContainer.AcousticMeshes.Any()) { InitializeTemporaryMeshCluster(); MeshClusters.ForEach(x => { if (x != null) { LoadMeshCluster(x); } }); Initialized = true; } }
private void OnDestroy() { if (SoundToolKitManager.Instance != null) { ClearGeometry(); } MeshClusters.ForEach(x => { if (x != null && x != m_temporaryCluster) { x.RestoreStateForEditmode(); } }); m_temporaryCluster = null; MeshDeletionUpdater.Destroy(); }