Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Windows HiDPI support

Discussion in '5.4 Beta' started by ZimM, Dec 23, 2015.

  1. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    OK, so we are getting Retina support on OS X. But what about Windows? There is already a ton of laptops and monitors with 3K/4K resolutions, and Unity looks as bad on them in Windows as it does in OS X. So why no support for Windows? Is it planned?
     
    vivek306 and Meltdown like this.
  2. Alex-Lian

    Alex-Lian

    Guest

    It works on Windows, it's just that the fractional zooms don't quite work right. So, 100% and 200% are fine, 125% not so much....Daniel B can elucidate more, but that's my understanding of things.
     
  3. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    Oh, good to know. There is no mention of Windows/HiDPI on this subject, only "OS X" and "Retina".
    As for fractional zooms - well, that's expected. It'll always be +/- 1 point off because of rounding.
     
  4. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    @AlexLian
    Is there any way to force Unity scaled mode? A command line option, maybe? I don't have a HiDPI screen, but I am developing assets for Asset Store and have to check if my GUIs will look OK for people who do have HiDPI screens. Switching the scale in Windows and logging in/out constantly is not really an option.
     
  5. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    @Alex Lian
    Just set my Windows to 200% scale, and nope, Unity looks as ugly as always:
    upload_2015-12-26_22-56-57.png
    You can clearly see the horrible pixelation of fonts and everything. Am I missing something? Is HiDPI support actually supposed to work in b1?
     
  6. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Hi @ZimM, unfortunately Windows HiDPI support didn't make it in before beta. I'll be looking at it soon, but it's currently not scheduled for 5.4.
     
  7. wangshibowyl

    wangshibowyl

    Joined:
    Dec 24, 2009
    Posts:
    9
    @Daniel Brauer ,I Desire WindowHiDPI support for 2 years. The screen capture of photoshop support HiDPI,beautiful.
    QQ截图20160105114907.png
     
    Teejay5 likes this.
  8. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    I completely understand, but Mac users have been waiting since 2012 so that happened first.
     
    MrEsquire likes this.
  9. ZimM

    ZimM

    Joined:
    Dec 24, 2012
    Posts:
    963
    @Daniel Brauer
    Just a hint for when you'll look into Windows support: starting with Windows 8.1, different monitors can have different scale, so the "pixels per point" value can in fact change in runtime just by dragging the window from one monitor to another. It'd be great to have support for this in Unity, since, for example, I often place the Console window on a separate low-DPI monitor. This is often overlooked in a lot of apps for some reason.

    https://blogs.windows.com/windowsexperience/2013/07/15/windows-8-1-dpi-scaling-enhancements/
     
    Last edited: Jan 5, 2016
  10. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    @ZimM Thanks, yeah I'm aware of that. OS X supports mixed monitor scales as well, so editor window has its own scale.

    The big issue with Windows is non-integer scales, since Unity's UI (and especially text rendering) is designed for pixel-perfect rendering. 200% is no problem, but it's hard to get 125% or 150% working nicely without breaking the implicit promises of IMGUI and making everything look terrible.
     
  11. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Exactly and thanks for supporting.
    Was it not Mac laptops that came out with retina support well before it went main stream on Windows computers, not quoting anyone but I also do see Apple first with 5k support etc
     
  12. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,058

    I mentioned this in the beta but it got no reply as it was around xmas and so I want to make sure it wasn't missed.

    With regard to Windows HDPI support and I guess on Mac, though I've not been able to check if the current Mac version already supports this, please consider adding a scaling preference to Unity so that we can have per application scale option and not rely just on system settings.

    A good example of this would be Photoshop that appears to have taken this approach with its 'Text UI Scaling' preference. This defaults to 'Auto' which I assume uses the current system scaling setting, but which can be overridden and explicitly set to either 100% or 200%. To me this provides the best all encompassing solution to the problem as the default behavior uses the system setting, but provides user custom settings ( ideally not fixed increments like Photoshop) for those cases where the system setting is not appropriate.

    That way I could for example set Windows HDPI to say 150% for software that supports it, Unity to 200% ( for whole increment), Photoshop to 200% and Blender to whatever dpi I like. In addition on a whim I could change Unity to say 125% or 175% depending on circumstance and whether the text is still legible at those settings.

    Another good reason for providing an application scaling option is that when I went to do a quick test of setting the Windows HDPI on my system, trying to change the scaling from Normal to Large ( 200%) required signing out of my windows account! This meant saving and probably closing all open apps which I was not in a position to do at the time and which would generally be inconvenient. This inconvenience would be solved by having a Unity UI scaling preference.
     
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Fair enough but interestingly, we are using a 5k retina mac, running windows (for console dev) :D
     
    AlanMattano likes this.