title: Destroy or disable Audio Listener programmatically?
body: <p>I have the following static camera:</p>
  
  <pre><code>public Camera standbyCamera;
  standbyCamera = GameObject.Find("StandByCamera").GetComponent&lt;Camera&gt;();
  </code></pre>
  
  <p>How can I disable or destroy the associated Audio Listener via code?</p>
  
  <p>I've tried the following, as well as some variants, and nothing works.</p>
  
  <p><strong>How can I disable the Audio Listener associated with a camera?</strong></p>
  
  <hr>
  
  <p><a href="https://answers.unity.com/questions/211287/disabling-audio-listener-in-unity-3d.html" rel="nofollow noreferrer">From the Unity forums</a>: </p>
  
  <pre><code>standbyCamera.GetComponent (AudioListener).enabled = false;
  </code></pre>
  
  <blockquote>
    <p>error CS0117: 'UnityEngine.Component' does not contain a definition for 'enabled'</p>
  </blockquote>
  
  <hr>
  
  <pre><code>Destroy (standbyCamera.GetComponent (AudioListener));
  </code></pre>
  
  <blockquote>
    <p>119: Expression denotes a <code>type', where a</code>variable', <code>value' or</code>method group' was expected</p>
  </blockquote>