Author Topic: UISprite problem, offset/padding problem.  (Read 4129 times)

Altiva

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
UISprite problem, offset/padding problem.
« on: May 08, 2015, 08:21:00 AM »
When I use a UISprite the image is displaced from the frame. Even the examples are displaces.

Here you can see the image displaced from the frame: http://i.imgur.com/0UNqvcZ.jpg

And here is the same image as a sprite with the unity UI system: http://i.imgur.com/SqIg7dP.jpg

This is very annoying and make ngui unusable for me. Any solution?

More context:
Tested in Unity 4.6.4 and Unity 5.0.1. NGUI versions 3.6.8 and 3.8.2 in clean projects.
I have been using ngui for a long time but I didn't notice this before because my GUI wasn't very demanding.

Thanks for the help.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISprite problem, offset/padding problem.
« Reply #1 on: May 09, 2015, 04:24:23 AM »
It's due to the half-pixel offset on DX9 -- a well-documented DX9 oddity, and is only noticeable when you zoom in greatly like you did.