How can I save my options menu?
So i have an options menu that i made ,I have 3 sliders (one for speed one for music and one for environment sound) and a toggle for screen shake. I have an public static bool x to make the conections with my player script. So my script is:
public static bool x;
public AudioMixer mix1;
public void Viteza(float viteza)
{
PlayerPrefs.SetFloat("viteza", viteza);
}
public void Volum(float volum)
{
volum = PlayerPrefs.GetFloat("Volum");
mix1.SetFloat("Muzica2", volum);
PlayerPrefs.SetFloat("Volum", volum);
}
public void Ambient(float volum2)
{
mix1.SetFloat("Ambient", volum2);
}
public void scuturare(bool shakess)
{
x = shakess;
}
and my question is how can i save these to load exactly the same when the scene is loaded?
Comment