Hi all, I'm wondering if Windows Phone deployment does not support Screen.dpi or if it is just my device (Nokia Lumia 521) as it always returns 0. Are there any other ways of determining the physical size of the device's screen? Regards, Daniel Quick
Now that's an old post. It works on windows phone as of Unity 5 or something. On Standalone player it reports logical DPI.
Okay, because I am getting customer complaints stating that the buttons are super tiny. If I switch to Physical Scaling (dpi) will that fix the problem. You said it works on Windows Phone and Standalone, but what about Windows Desktop 8.1/10?
Ok, it's just confusing as I don't know the terminology for the different platforms: - PC Standalone - Windows Desktop - Windows Phone I had assumed he was referring to PC Standalone, but thanks for the clarification. Also, what's logical DPI? Is it not true DPI?
It should be working. On Windows Store on desktop you'll get physical DPI. Logical DPI is the scaling value set in display properties multiplied by 96. For example, if the system scale level is 100%, logical DPI will be 96. If the system scale level is 150%, logical DPI will be 144. Physical DPI is the actual number of pixels per inch.
Okay, so to clarify, if I set the Canvas to Physical Units, will the buttons remain the same size regardless of scale mode in the display properties?
It should... though I'm not exactly convinced that you really want the buttons to be sized identically on a phone and on a PC. User will have a phone much closer to his face. I'd suggest testing on various form factors yourself.
What I meant was that if your customer complains about buttons being too small, you should look at it for yourself instead of blindly changing UI settings and relying on a forum answer for it to work correctly.
That was great to find since I'm stumbling on it. Thanks. Alas, I find frustrating that there is nothing about logical / physical dpi definition in the documentation: https://docs.unity3d.com/ScriptReference/Screen-dpi.html Neither there is anything about how this function behaves in other platforms (i.e.: Mac, Linux, iOS, Android... -Well, there is a related discussion in Android, but nothing more). Would you please care to elaborate? Maybe ping the documentation team. Thanks!