UI Scaling changed in 2.12?

Started by spirix, March 07, 2016, 04:21:37 AM

Previous topic - Next topic

spirix

not possible, because 2 displays with different resolutions (4k and 2k)

knucracker

When you change both system and user to 144 dpi take a look at the game's output log and note the desktop and virtual desktop resolution.  In particular the virtual desktop resolution.  That is the thing that changes between version 2.08 (which was built with unity 4) and 2.12 (which was built with unity 5).  I've not been able to explain the virtual desktop resolution that unity calculates but can only assume it has something to do with the dpi settings.

Interestingly, in 2.08 it calculated a virtual desktop that is lower (in the vertical dimension) than your 4k monitor.  That's why you are getting a global zoom on the game (I think).  In 2.12 it calculates a virtual desktop that is larger than your 4k monitor... and to it's even an odd number (really strange).

Now the good/bad news is that 2.12 is actually doing things properly and 2.08 is incorrect.  That zoom you are getting in 2.08 isn't supposed to happen and there isn't even supposed to be a way to do it.  It must be a rare convergence of things in your particular setup (multi monitors, dpi alterations, etc) that exposed a bug in unity 4 that in your case turns out to be beneficial.

I wish there was some way to officially do a universal global zoom in unity rather than having to mess with OnGUI.matrix, and every camera....  but they have not added HIDPI support yet and are just now getting around to rolling it out for OSX in the upcoming Unity 5.4 release.

spirix

#17
Hi Virgil,

finally found some time to test more.
I physically disconnected the 2nd display and tried again. Same different zooms between 2.08 and 2.12.

See Screenshots and Logs here https://www.dropbox.com/sh/l2f4t7u4zkx4xpp/AAASfKhQ6EVz8Ivf5jqB2f-da?dl=0.

I see in the output.log that 2.08 reads the correct physical resolution, but a different (2k) virtual resolution. 2.12 reads the correct physical resolution and the virtual resolution is the same as the physical. Looks like 2.08 then uses the 2k virtual resolution to display the game.

The question for me as a user is now how to handle this if I want to play future games which use unity 5 which is obviously using the correct settings but is way to small on a high dpi display. Do you need to add an option to zoom the entire UI of a game, and is this even possible?

GoodMorning

I gave the game to someone who has found it very hard to learn, due to a small, high-resolution display. An option to change UI scale would help a lot. Note: the actual map/world isn't changed, only the UI...
Just a point I thought should be made.
A narrative is a lightly-marked path to another reality.