Is it possible to change Audio Manager Volume by script?

Hi!

It happens that I have two audio Listeners in my scene (with one enabled when the other is disabled). I found out that no matter which Listener is enabled, if I would change the value in Audio Manager Settings (project settings, it will affect the overall volume. Well, is it possible to change that by script?

I know that I could achieve the same result by getting all the listener components (or the one currently enabled) and change their volume value. But except of that would be slightly more complicated, isn’t it more efficient to approach it from the shortcut way I look for?

Thank you!

I’m not sure why you have two audio listeners.

Anyway, you could use AudioListener.volume to control the volume of the game (assuming one audio listener is used).

Or (untested), you would get all the audio listeners, loop through them, and modify the AudioListener.volume for each.