How to make the mute button remember witch image it has when i click on it.Because now when i click on it changes from unmuted img to muted and the music goes from unmuted to muted, but when i change scenes it goes back to unmuted img but the music is muted and when i pres the button stays unmuted and the music becomes unmuted. I m a beginner in c# here is the script
public class audiomute : MonoBehaviour {
public GameObject mutetxt;
public GameObject unmutetxt;
public void OnMOuseDown()
{
if (AudioListener.pause != true)
{
AudioListener.pause = true;
mutetxt.SetActive(true);
unmutetxt.SetActive(false);
}
else {
AudioListener.pause = false;
mutetxt.SetActive(false);
unmutetxt.SetActive(true);
}
}
}