volume manager from scene to scene

Hey everyone,

volume manager works great…however. I have the same script attached to 2 volume buttons WHICH ARE TOGGLES. 1 on my start scene, another on my play scene since they have different sounds they control. Below is my script and then my question.

 public bool isMute;

public void IsMute()
    isMute = !isMute;
    AudioListener.volume = isMute ? 0 : 1; 

so! on the start scene if I press the toggle, it will change the sprite (good) and the mute will carry over to the play scene (ALSO GOOD). the problem is the volume toggle in the play scene will not be on the right setting, so I will have to press it twice. once to get it to the correct sprite for the current volume setting and then again so that I can actually unmute it.

  //how do i make it so that the toggle is already on the correct setting so that I only have to push it once instead of twice in the other scene

Why don’t you add a Check to the Volume Checker Script which changes the sprite to mute or unmute.
Like add this in an Init Method for that script that actually sets up the starting images or starting UI or simply add this check inside that Start Method which you use to change sprite

//Enable Mute Sprite
//Disable Unmute Sprite

//Enable Unmute Sprite
//Disable Mute Sprite