It’s my code to play a sound and it works fine.
public AudioSource sound1;
public AudioSource sound2;
public AudioSource sound3;
public AudioSource sound4;
public void Sound1(){
sound1.Play ();
}
public void Sound2(){
sound2.Play ();
}
public void Sound3(){
sound3.Play ();
}
public void Sound4(){
sound4.Play ();
}
they work fine how could I mute them when I click on a button?
I mean I can use sound.volume = 0; ,but I have to use it for all of them ? any idea?