Hi guys, Im making a 2D game, but im not a developer but I do have a slight understanding of C#. However, any idea how to create a really simple mute / unmute button? Thanks,
I'm assuming you want this for sound or music, if you're looking to mute players in a multiplayer setup its a bit more involved but here goes: -create a UI button that will toggle the audio when clicked. -create a C# script with a mute function that the ui button will reference for OnClick() (or whatever the native uGui…
hey man, Thanks for your help, very useful. im sorry I should have mentioned that I need to mute the sound effects not the music. I have taken care of the music part thanks to you. But since im not a developer, i think im a bit confused about how to mute all sound effects.. Thank you,
Yeah when you create an audio mixer you can have different channels, so generally you'l have one for sound, voiceover, music, mic input/output etc.. Every sub group that you create can be drag/dropped into the audio mixer group input of the audio source
I guess the mixer thing worth a try, even if im a beginner, will it work if I created another one but only for music instead of sound effects? Thank you man,
No problem! So for the sounds since i'm assuming you've got a ton of audio sources you'l have to use the audio mixer approach. Essentially you'l create the mixer, assign a mixer group to all your audio sources that create a sound effect, then mute that mixer group. Its def. a bit more advanced but i think thats pretty much…