public override void OnInspectorGUI()
 {
   if (this.IsMissingMonoBehaviourTarget() && this.MissingMonoBehaviourGUI())
     return;
   base.OnInspectorGUI();
   if (!(this.target is MonoBehaviour) || !AudioUtil.HaveAudioCallback(this.target as MonoBehaviour) || AudioUtil.GetCustomFilterChannelCount(this.target as MonoBehaviour) <= 0)
     return;
   if (this.m_AudioFilterGUI == null)
     this.m_AudioFilterGUI = new AudioFilterGUI();
   this.m_AudioFilterGUI.DrawAudioFilterGUI(this.target as MonoBehaviour);
 }
Exemplo n.º 2
0
 public override void OnInspectorGUI()
 {
     if (!this.IsMissingMonoBehaviourTarget() || !this.MissingMonoBehaviourGUI())
     {
         base.OnInspectorGUI();
         if ((base.target is MonoBehaviour) && (AudioUtil.HaveAudioCallback(base.target as MonoBehaviour) && (AudioUtil.GetCustomFilterChannelCount(base.target as MonoBehaviour) > 0)))
         {
             if (this.m_AudioFilterGUI == null)
             {
                 this.m_AudioFilterGUI = new AudioFilterGUI();
             }
             this.m_AudioFilterGUI.DrawAudioFilterGUI(base.target as MonoBehaviour);
         }
     }
 }
Exemplo n.º 3
0
 public override void OnInspectorGUI()
 {
     if (!this.IsMissingMonoBehaviourTarget() || !this.MissingMonoBehaviourGUI())
     {
         base.OnInspectorGUI();
         if ((base.target is MonoBehaviour) && (AudioUtil.HaveAudioCallback(base.target as MonoBehaviour) && (AudioUtil.GetCustomFilterChannelCount(base.target as MonoBehaviour) > 0)))
         {
             if (this.m_AudioFilterGUI == null)
             {
                 this.m_AudioFilterGUI = new AudioFilterGUI();
             }
             this.m_AudioFilterGUI.DrawAudioFilterGUI(base.target as MonoBehaviour);
         }
     }
 }
Exemplo n.º 4
0
 public override void OnInspectorGUI()
 {
     if (this.IsMissingMonoBehaviourTarget() && this.MissingMonoBehaviourGUI())
     {
         return;
     }
     base.OnInspectorGUI();
     if (!(this.target is MonoBehaviour) || !AudioUtil.HaveAudioCallback(this.target as MonoBehaviour) || AudioUtil.GetCustomFilterChannelCount(this.target as MonoBehaviour) <= 0)
     {
         return;
     }
     if (this.m_AudioFilterGUI == null)
     {
         this.m_AudioFilterGUI = new AudioFilterGUI();
     }
     this.m_AudioFilterGUI.DrawAudioFilterGUI(this.target as MonoBehaviour);
 }
Exemplo n.º 5
0
        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);
                }
            }
        }
Exemplo n.º 7
0
        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);
                }
            }
        }