internal bool DoDrawDefaultInspector() { bool res; using (new UnityEditor.Localization.Editor.LocalizationGroup(target)) { res = DoDrawDefaultInspector(serializedObject); var behaviour = target as MonoBehaviour; if (behaviour == null || !AudioUtil.HasAudioCallback(behaviour) || AudioUtil.GetCustomFilterChannelCount(behaviour) <= 0) return res; // If we have an OnAudioFilterRead callback, draw vu meter if (m_AudioFilterGUI == null) m_AudioFilterGUI = new AudioFilterGUI(); m_AudioFilterGUI.DrawAudioFilterGUI(behaviour); } return res; }
public override void OnInspectorGUI() { if (IsMissingMonoBehaviourTarget() && MissingMonoBehaviourGUI()) { return; } base.OnInspectorGUI(); if (target is MonoBehaviour) { // Does this have a AudioRead callback? if (AudioUtil.HasAudioCallback(target as MonoBehaviour) && AudioUtil.GetCustomFilterChannelCount(target as MonoBehaviour) > 0) { if (m_AudioFilterGUI == null) { m_AudioFilterGUI = new AudioFilterGUI(); } m_AudioFilterGUI.DrawAudioFilterGUI(target as MonoBehaviour); } } }
public override void OnInspectorGUI() { if (ObjectIsMonoBehaviourOrScriptableObject(target) && MissingMonoBehaviourGUI()) { return; } base.OnInspectorGUI(); var behaviour = target as MonoBehaviour; if (behaviour != null) { // Does this have a AudioRead callback? if (AudioUtil.HasAudioCallback(behaviour) && AudioUtil.GetCustomFilterChannelCount(behaviour) > 0) { if (m_AudioFilterGUI == null) { m_AudioFilterGUI = new AudioFilterGUI(); } m_AudioFilterGUI.DrawAudioFilterGUI(behaviour); } } }