Okay I want to turn off all audio at once when the mute button is being pressed.
I found AudioListener.volume that works to adjust volume, but I tried attaching a code with an empty object, it didn’t work.
Then I found out that I could use the listener script on Unify Community to control the audio volume, which it works like a charm! However, the instruction says that I need to use the following variable declaration in a different script, and drag the Game Object containing the Audio Listener component onto the Listener variable. Then I can call " listener.Volume(value); " from other gameobject. I haven’t been able to make it work yet…
var listener : Listener;
I wonder if it is unity iphone or something else, it says that Listener does not denote a valid type.
What should I do? I have been working on this whole day and nothing is working…