Esempio n. 1
0
 private void Start()
 {
     MeshClusters.ForEach(x =>
     {
         if (x != null && x != m_temporaryCluster)
         {
             x.SaveStateForPlaymode();
         }
     });
 }
Esempio n. 2
0
 internal void ClearGeometry()
 {
     MeshClusters.ForEach(x =>
     {
         if (x != null)
         {
             UnloadMeshCluster(x);
         }
     });
     SoundToolKitManager.Instance.StkAudioEngine.Scene.Clear();
     SoundToolKitManager.Instance.ResourceContainer.Geometry = null;
 }
Esempio n. 3
0
 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.");
         }
     });
 }
Esempio n. 4
0
        internal void InitializeMeshClusters()
        {
            if (!Initialized && SoundToolKitManager.Instance.ResourceContainer.AcousticMeshes.Any())
            {
                InitializeTemporaryMeshCluster();

                MeshClusters.ForEach(x =>
                {
                    if (x != null)
                    {
                        LoadMeshCluster(x);
                    }
                });

                Initialized = true;
            }
        }
Esempio n. 5
0
        private void OnDestroy()
        {
            if (SoundToolKitManager.Instance != null)
            {
                ClearGeometry();
            }

            MeshClusters.ForEach(x =>
            {
                if (x != null && x != m_temporaryCluster)
                {
                    x.RestoreStateForEditmode();
                }
            });

            m_temporaryCluster = null;
            MeshDeletionUpdater.Destroy();
        }