Display Resolution Dialog: The 2019.3 replacement for those who can't live without it! :)

SHOCK! Unity deprecated and rather quickly removed the resolution dialog without a proper replacement! :hushed:

Then they gave us a C/C++ Screen Selector project that’s really ugly to get working (particularly if you don’t have a C/C++ Windows SDK background) and is nowhere near as convenient to use. For instance, default resolution is always 640x480. And how do I make it to run my Unity app after clicking Play? :rage:

“Based on user data and customer research” … well, I have a hunch in this case it’s nowhere as obvious as, say, the removal of … what was it called? That scripting language that no one even remembers existed 5 years ago when it was still part of Unity. Ah … yes, Boo! So no, some of us do need the resolution dialog! Dearly so. :frowning:

I understand, if it’s in the way of something new and great, by all means remove it and (gradually) replace it with something better, less buggier. But user data and customer research? Come on. We’re the 10% you ignored who make non-public apps or just like to tinker with settings and generally dislike sending usage data to Unity! :stuck_out_tongue:

Enough ranting … the good thing about this is, it’s something we can simply fix this and bring it back - and making it even better! :sunglasses:

So without further ado here’s the replacement I’ve come up with:

Screenshot from the editor. Actual data will differ. 16k? We’re not quite there yet. :wink:

What’s cool about this?

  • FREE! Released under MIT License.

  • When used as the first (launch) scene it will automatically load the second scene in the Build Settings list when pressing Play.

  • Can also act as a popup in any scene. Press ESC (configurable) to bring it up. The Play/Quit buttons will be replaced with a “Close” button.

  • Has absolutely no dependencies to whatever. Not even TMPro. Just plain Unity 2019.3.

  • More features than the old Unity Resolution Dialog:

  • Changes are applied instantly!

  • Select refresh rate (exclusive fullscreen only - windowed modes use the desktop refresh rate)

  • Adjust Vsync Count: off, vsync on, vsync every 2nd, 3rd or 4th frame (useful as framerate limiter)

  • Built-in FPS display so you can see the difference in fps when changing settings

Caveats:

  • No option to display dialog only when Shift or Alt are held down (see comment #4)
  • Switching Displays requires restarting the app. Due to lack of a 2nd monitor I have only been able to test this once.
  • Tested only on Windows but should work on Mac OS X and Linux. Probably useless on any other platform except changing quality levels.
  • In editor anything but Quality Level is locked because all other settings are controlled by the editor respectively not available in windowed mode.
  • No input support. That’s the one aspect of the original dialog I’ve never had any use for.

Feel free to leave feedback or better yet: fix anything that ain’t working and send a pull request.

36 Likes

Legend

Does it also work like the old original one, where you could start it with Shift+Click only?

Unfortunately not. It would have been a rather odd behaviour therefore I opted not to try and mimic this behaviour.

The reason is: GetKey() only works in Update(), and apparently while a scene is loading or in the first scene, the first time keys are registered/received happens at the earliest in the 3rd time Update() gets called. So you would see the dialog anyway for 3 frames even if not holding down Shift or Alt.

Perhaps someone knows a trick or workaround to this? I can only think of hiding the dialog for the first few frames so it wouldn’t feel as odd, but you’d still have to keep the Shift/Alt key pressed for sometime longer compared to the original dialog due to Unity having to initialize first.

1 Like

Thanks for making this!!

It’s super-cool that you have created and shared this! Unfortunately, for the use case of VR games, the shift/alt-feature was all I (and quite a few players) ever needed that resolution dialog for.

It really sucks that Unity removed it.

2 Likes

The unity package link seems to be broken.

1 Like

Thank you for this. It s incredible how Unity removed such a great feature like that ad now we need to find workaround for such a useful feature. Why they just didn’t let us to enable/disable it?

Hey I just wanted to say thanks for building this. Totally agreed that Unity shouldn’t have abruptly removed their original selector without a replacement… but yours is very good!

Steffen Itterheim

I also want to thank you for your work. I wanted to provide users with the chance to drop to a lower resolution if their FPS is too low… Bonus it can perform this dynamically at runtime. Used GraphicsSettingsHandler script with my own front end. Saved me a lot of research, trial and error and I learned something. Appreciate it.

Nice! can it be used for dual display? I mean one stand alone scene viewing on both displays?

This one dosent work right with Unity 2021, The Windowed option don’t work. Any update on this?

Can get it to work right in latest 2022. The screensize dont affect change. Only when restart. qwality setting is on Very Low in the start, even when I sett it to Ultra. Please can you update! Thanks in advance.

I’m using Unity 2023.2.5f1.

Setting it as the first launch scene only pulls up a black screen. Hitting Esc does pull up the popup window but the play and quit buttons aren’t there so I cant launch into the second scene.

I feel very lost as to how this should work when using the launch scene method.

Do not install via Package Manager, download the whole code,
Import and open GraphicSettingsHandler.cs and edit the line 153 :

//var hz = resParts[2].Trim();
var hz = res.refreshRate.ToString();

Worked well with this fix in 2022.3.34, but did not test in the other versions
I won’t make a pull request because ‘refreshRate’ property has been obsoleted
Eventually, this workaround will not be suitable in the later versions

Thank you to @CodeSmile and Community,
Peace out

1 Like