Hi, I added to my game the sound on and off, everything works fine, the only problem is that the game doesn’t remember for a scene to another to set true the volumeOff button.
Here there is the script :
public void VolumeOn()
{
AudioListener.pause = !AudioListener.pause;
if (AudioListener.pause == false)
{
volumeButtonOn.gameObject.SetActive(true);
volumeButtonOff.gameObject.SetActive(false);
}
else if (AudioListener.pause == true)
{
volumeButtonOff.gameObject.SetActive(true);
volumeButtonOn.gameObject.SetActive(false);
}
have you some ideas? thank you!