public override void OnInspectorGUI() { base.OnInspectorGUI(); serializedObject.Update(); MonoSound t = (MonoSound)target; EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode); { EditorGUILayout.PropertyField(m_InstanceRoot); EditorGUILayout.PropertyField(m_AudioMixer); m_SoundHelperInfo.Draw(); m_SoundGroupHelperInfo.Draw(); m_SoundAgentHelperInfo.Draw(); EditorGUILayout.PropertyField(m_SoundGroups, true); } EditorGUI.EndDisabledGroup(); if (EditorApplication.isPlaying && IsPrefabInHierarchy(t.gameObject)) { EditorGUILayout.LabelField("Sound Group Count", t.SoundGroupCount.ToString()); } serializedObject.ApplyModifiedProperties(); Repaint(); }
public AudioClip GetMono(MonoSound mono) { return(monos[mono.ToString()]); }
public void PlayMono(MonoSound mono) { monosound.clip = ArchLoader.instance.GetMono(mono); monosound.Play(); }