Author Topic: Sliced Sprite Set to full screen shows up wrong on mobile devices  (Read 2773 times)

Augur

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
I apologize if this was asked already, I did a search and couldn't find a similar question.

I have a sliced sprite that looks like this (I don't know how to embed in this editor, image "SlicedSprite.png")

and in the editor it looks exactly how I want using anchors relative to the UIRoot ("inEditor.png")

but on iPhone5 the sliced sprite is scaled up and looks like the picture "iPhone5.png"

I have tried a number of different settings, but nothing seems to fix it, so anything else I can try would be helpful. Unfortunately I have to deploy every time to see if it worked, and iOS is such a pain in the ass that I have to upload it to testflight or else it can't deploy to this phone. But that is a rant for a different day.




Augur

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Sliced Sprite Set to full screen shows up wrong on mobile devices
« Reply #1 on: November 19, 2014, 11:34:01 AM »
So I was thinking, an iPhone5 has a resolution of 640 in the dimension I'm using for height, and my sliced sprite is using 58px square corners. So it should be taking up about 8.5% of the screen height. It looks more like it's taking up 20%, and in the editor it looks more like 4% so I'm not sure if there is actually a problem with the way the sprite is created.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sliced Sprite Set to full screen shows up wrong on mobile devices
« Reply #2 on: November 19, 2014, 03:59:15 PM »
Assuming you aren't doing anything yourself and aren't swapping atlases, it should remain consistent. Try NGUIDebug.Logging the sprite's width, height and border to see what the difference is between your editor and device.