internal void ClearSerializedData() { #if UNITY_EDITOR if (!UnityEditor.EditorApplication.isPlaying) { if (Serialized) { m_serializedGeometry.EraseFromDisk(); } } m_serializedGeometry = null; #endif }
internal void Serialize() { #if UNITY_EDITOR if (Model == null) { SoundToolKitDebug.LogWarning("Cannot serialize MeshCluster: " + name + "'s geometry data." + " No internal SoundToolKitModel exists for that Cluster."); return; } ClearSerializedData(); m_serializedGeometry = MeshClusterUtility.CreateSerializedGeometry(name + "_SerializedGeometry"); Model.SaveGeometry(data => m_serializedGeometry.WriteData(name, data)); SoundToolKitManager.Instance.Finish(); m_playSessionGeometry = m_serializedGeometry; UnityEditor.EditorUtility.SetDirty(this); UnityEditor.AssetDatabase.SaveAssets(); UnityEditor.AssetDatabase.Refresh(); #endif }
internal void RestoreStateForEditmode() { AcousticMeshNames = m_playSessionMeshes; m_serializedGeometry = m_playSessionGeometry; }