- Home /
Question by
sachinbirajdar · Sep 15, 2017 at 01:14 PM ·
buttonaudio
Button to mute and un mute audio not working.
Hello, I am trying to mute and un mute audio.I have button to achieve this.I have attached this script to player and have Mute-audio function attached to button.This printing the char values but not unmuting audio.What should I do? Thanks.
{ AudioSource audioSource;
void Start()
{
audioSource = GetComponent<AudioSource>();
}
public void MuteAudio() { audioSource.mute = !audioSource.mute; print ("Mute Audio"); }
}
Comment