- Home /
In Game Graphics/Resolution Options
I'd like to have a graphics settings menu in my game where the resolution the game starts in can be set. This gets saved in PlayerPrefs.
The problem is, the setting names are things like "Screenmanager Resolution Height_h2627697771", "Screenmanager Resolution Width_h182942802", "Screenmanager Is Fullscreen mode_h3981298716"
If you set a value for "Screenmanager Is Fullscreen mode" it gets overridden by these settings with the _hXXXXXXX at the end. How are we supposed to set these values from in game? How do these _hXXXXXXXX strings get generated?
Well I guess I was overthinking this. After doing more testing, it appears that calling Screen.SetResolution automatically saves the changes in PlayerPrefs.
Answer by adriono · Mar 22, 2017 at 05:23 PM
I didn't analyse this yet, but you can look how it works in Open Source Pause Menu. https://www.assetstore.unity3d.com/en/#!/content/59478
Screenshot:
Glancing over the source it doesn't look like it saves the resolution, just changes it at run-time.