HaveAudioCallback() private method

private HaveAudioCallback ( MonoBehaviour behaviour ) : bool
behaviour UnityEngine.MonoBehaviour
return bool
        internal override bool GetOptimizedGUIBlock(bool isDirty, bool isVisible, out OptimizedGUIBlock block, out float height)
        {
            bool blockImplementation = this.GetOptimizedGUIBlockImplementation(isDirty, isVisible, out block, out height);

            if (this.target is MonoBehaviour && AudioUtil.HaveAudioCallback(this.target as MonoBehaviour) && AudioUtil.GetCustomFilterChannelCount(this.target as MonoBehaviour) > 0 || this.IsMissingMonoBehaviourTarget())
            {
                return(false);
            }
            return(blockImplementation);
        }
 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);
         }
     }
 }
        internal override bool GetOptimizedGUIBlock(bool isDirty, bool isVisible, out OptimizedGUIBlock block, out float height)
        {
            bool optimizedGUIBlockImplementation = base.GetOptimizedGUIBlockImplementation(isDirty, isVisible, out block, out height);
            bool result;

            if (base.target is MonoBehaviour)
            {
                if (AudioUtil.HaveAudioCallback(base.target as MonoBehaviour) && AudioUtil.GetCustomFilterChannelCount(base.target as MonoBehaviour) > 0)
                {
                    result = false;
                    return(result);
                }
            }
            result = (!this.IsMissingMonoBehaviourTarget() && optimizedGUIBlockImplementation);
            return(result);
        }
 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);
 }
Beispiel #5
0
        internal override bool GetOptimizedGUIBlock(bool isDirty, bool isVisible, out OptimizedGUIBlock block, out float height)
        {
            bool optimizedGUIBlockImplementation = base.GetOptimizedGUIBlockImplementation(isDirty, isVisible, out block, out height);

            return((!(this.target is MonoBehaviour) || !AudioUtil.HaveAudioCallback(this.target as MonoBehaviour) || AudioUtil.GetCustomFilterChannelCount(this.target as MonoBehaviour) <= 0) && !this.IsMissingMonoBehaviourTarget() && optimizedGUIBlockImplementation);
        }