- Home /
Get Current Screen Window is Positioned In, Get Dpi of That Screen
I'm trying to upgrade my wrappers of Unity's old GUI API to scale things to real-world size instead of pixels (and shrinking to unreadably tiny on retina displays). Screen.dpi seems to only give the dpi of the main screen. Also, I can't find a way to find out which screen the Unity standalone player's window is in. Are these two things possible?
Can Unity's new GUI API do this (scale according to the dpi of the screen the player window is on, not the dpi of )? (I don't want to use it, except as a last resort. It would require rewriting a lot of stuff, since things have to be instantiated and torn down, instead of just drawn).
Answer by scarletshark · May 06, 2015 at 02:31 PM
In the new Unity GUI (as of 4.6), the Canvas object has a "Canvas Scalar" component that handles how your app will scale to different screen sizes. Play around with it to find what works best for you! What I believe you are looking for is Constant Physical Size. See below:
Your answer
Follow this Question
Related Questions
Fullscreen mode stuck at windowed 0 Answers
iOS status bar 2 Answers
Two game screens/windows? 3 Answers
code Window and full screen mode ? 1 Answer
how to get a window bigger than screen 0 Answers