- Home /
Question by
deltron1830 · Nov 01, 2019 at 04:08 PM ·
unity 5mobilescreen
Unity Screen.height / Screen.dpi is *not* equal to the screens height in real life.
On mobile, I was planning on using Screen.dpi to work out the physical size of the screen ans size controls accordingly.
But this quick test on my Galaxy S5 proves that the number from Unity are wrong.
1080 / 480 = 2.25 But the screen in real life is over 2.5 inches high.. So this is way off.
Any suggestions..? Right now I think I'll just leave this, and have the controls the same size in world space.. rather than risk making them worse.
size.png
(496.8 kB)
Comment
DPI on on android isn't always that simple.
Check out this thread: https://forum.unity.com/threads/screen-dpi-on-android.414014/