2D Toolkit Forum
2D Toolkit => Support => Topic started by: dlmrky on February 15, 2014, 06:54:02 pm
-
Hi, I have a Nexus 7 (2013), which has a resolution of 1200x1920 in portrait.
I have a background image that is exactly 1200x1920 and in Unity my project looks like this:
UNITY
(http://i.imgur.com/xqTU38G.png)
You can see the scene settings are 1200x1920 as are the 2DTK camera
When I run it on my Nexus 7 (2013) it cuts the top and bottom off (you can see the pink area chopped)
NATIVE
(http://i.imgur.com/wkwXKr6.png)
If I apply an override (Fit Visible) it then adds bars down the sides:
FIT
(http://i.imgur.com/2CgDp2R.png)
Why can't I get a 1200x1920 image to display perfectly on a 1200x1920 Nexus 7 (2013) device without stretching? Surely it should be 1:1 on the display?
(sorry for the huge screenshots!)
Thanks.
-
What does Screen.width and Screen.height return when running on device? Thats what tk2dCamera uses at runtime. Try printing it out, I suspect it might be less.
-
You're totally right - it comes back as 1200x1824 !?
Is that usual for devices, to not actually be the advertised dimension?
Either way, thank you. Do I now set up my scene plus native/preview as 1200x1824?
-
Yes I think you'll have to deal with that resolution, as the rest of it is taken by the home menu bar. Not sure if its possible to turn that off...