Hello,
I'm working on an options menu but i kinda struck a wall. I have 2 toggles, one for music and one for sfx.
I want to make so the game remembers users input and I'm using `switch (MusicInt)`switch for changing int, but it wont switch between cases. Also i cant get the game remember game state and switch.
Thank you in advance! :)
Switch Code:
public static void Music()
{
int MusicInt = 1;
switch (MusicInt)
{
case 1:
MusicInt = 1;
PlayerPrefs.SetInt("MusicM", MusicInt);
break;
case 2:
MusicInt = 0;
PlayerPrefs.SetInt("MusicM", MusicInt);
break;
}
Debug.Log(MusicInt);
}
↧