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.

2 Answers

2

I didn’t analyse this yet, but you can look how it works in Open Source Pause Menu.

Screenshot:

Glancing over the source it doesn't look like it saves the resolution, just changes it at run-time.

No. Each instance of the prefab has its own health, that can change during the OnTriggerStay. I need to get the health by reference in the OnTriggerStay for the other collider.

perfect package thanks for the link

And this is with one gameobject staying in the ontriggerstay? I can see issues with multiple objects and only 1 reference.