Author Topic: Every single UISprite is shifted?...  (Read 1377 times)

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Every single UISprite is shifted?...
« on: April 23, 2014, 06:54:55 AM »
Hi,
i just noticed something really weird, all my UISprite are shifted relatively to their frame (which able to resize them). Most of the time, the sprite is displayed 1 pixel higher and 1 pixel more on the left...
The problem is probably in the drawingDimension getter in the UISprite class.
Thanks for your help :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Every single UISprite is shifted?...
« Reply #1 on: April 23, 2014, 07:39:43 AM »
Half pixel offset, used in DirectX 9. Unity editor uses DirectX 9. Google "half pixel dx9" if you want to know the reason behind this.

Ernest

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 40
    • View Profile
Re: Every single UISprite is shifted?...
« Reply #2 on: April 23, 2014, 07:48:33 AM »
And there is no way to correct this behaviour??

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Every single UISprite is shifted?...
« Reply #3 on: April 23, 2014, 08:01:36 AM »
Don't zoom in so close? :) It's not visible under normal circumstances, and it's only like that in the Scene view anyway.