hello i have a toggle button to control my audio. The sprite changes everytime i push the button and the sound is on/off also. The problem is that when i change scene and comeback the sprite is back to what it was before i touch the button. I know i need to use PlayerPrefs to save my button sprite through scenes but i dont know how to implemant that on my script: This is my button manager script :
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class Buttonmanager : MonoBehaviour
{
public void Newgamebtn(string newGameLevel)
{
Time.timeScale = 1f;
SceneManager.LoadScene(newGameLevel);
}
public void ExitGameBtn()
{
Application.Quit();
}
public void Mute()
{
AudioListener.pause = !AudioListener.pause;
}
}
thank you in advance for your help