Use this:
function Update()
{
if(Input.GetKeyDown(KeyCode.Alpha1))
{
audio.mute = !audio.mute;
}
}
It didn't recognize your "1" string. Also the muting is more clean now.
↧