How to save which quality setting the player has chosen using PlayerPrefs, my idea of this would lead to something like this:
PlayerPrefs.SetInt("UnityGraphicsQuality", QLevel);
Where QLevel is a number that changes when the player clickes a button, but this seems to get reset everytime the game restarts.
NOTE: I have disabled the start up menu, because I wanted it to be in-game only.
So, before restart I run this code:
QLevel Starts as 3, then the player changes QLevel to be 5.
PlayerPrefs.SetInt("UnityGraphicsQuality", QLevel);
PlayerPrefs.Save();
Then after a restart I run this code:
var QLevel = PlayerPrefs.GetInt("UnityGraphicsQuality");
QualitySettings.SetQualityLevel (QLevel, true);
After the restart if I Debug.Log QLevel it is 3, so the value got reset on startup.
I have checked in the registry and the value becomes 5 untill I restart the game, then it is back to 3.