Hello Guest

Author Topic: 1:1 fit on Nexus 7 (2013)  (Read 2904 times)

dlmrky

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
1:1 fit on Nexus 7 (2013)
« 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


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


If I apply an override (Fit Visible) it then adds bars down the sides:

FIT


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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 1:1 fit on Nexus 7 (2013)
« Reply #1 on: February 15, 2014, 10:42:01 pm »
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.

dlmrky

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: 1:1 fit on Nexus 7 (2013)
« Reply #2 on: February 15, 2014, 11:03:13 pm »
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?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 1:1 fit on Nexus 7 (2013)
« Reply #3 on: February 15, 2014, 11:57:16 pm »
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...