Posted November 05, 2021 by b._.render
In the past I use to make a popup menu which had some options on it and put the mute bool there, this time I made it so anywhere in the game you can press "m" to mute the game. as you can see below I have a simple input event func checking for "m" key and it checks to see if master audio bus is mute and sets it to the opposite value. This is running on a auto loaded script so it can get called from anywhere.
I keep the data in a dictionary for ease of acces and it makes it incredibly easy to save the games progress when I want to implement that. But I bet its not the "best" way to do it.