Hello, guys. Im from russia, and im is noob in Unity.
I have problem. I dont how to switch the audio listeners.
I need to audiolistener FPC switched off when player dies, and audiolistener other camera switched on. Help please. And sorry for my English.
If you know the name of the two objects that have the audio listeners, you can do:
var go = GameObject.Find("Main Camera");
var al = GetComponent(AudioListener);
al.enabled = false;
Where “Main Camera” is the name of the game object with the listener, and “al.enabled” can be set to true or false depending on whether you are turning the listener on or off.