|
Im developing a Android Game, and to adjust my camera, i need to check the size of the screen of my user, the actual inch of the display, and not the resolution. Because there are devices with the same display size and different resolutions. In Android development this is fixed using the DP unit. Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion.
(comments are locked)
|
|
I asked this question a while back for iOS: http://answers.unity3d.com/questions/23490/is-there-a-way-to-detect-a-retina-display Currently (as of Unity 3.1) there does not seem to be a way to do it- the iOS workaround is simply to enumerate known devices that have a retina display. I do not have access to the Android version though, and given the proliferation of Android devices I would expect such a setting to be even more important So perhaps there's a solution for Android I don't know about. I found this: http://unity3d.com/support/documentation/ScriptReference/iPhoneSettings.html Maybe it can help you, checking by the model of the device.
Jan 03 '11 at 03:16 AM
Potapczuk
Yep, that's the answer I keep getting, but it potentially breaks when new models come out. So I'd prefer to know the actual DPI (which would also help you with your Android situation) or have a retina display indicator (iOS only.)
Jan 03 '11 at 08:41 PM
Bampf
(comments are locked)
|
