Author Topic: UISprite moves about when anchored if the aspect ratio is set  (Read 1994 times)

chromex

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Hi! We are seeing a strange issue where we create a basic 2D UI scene and try to anchor a sprite to the left, bottom, and right of the screen. When we set the sprite to maintain aspect ratio, it tends to jump around instead of just being anchored in place. E.g., when we change its depth, it'll move towards where it is supposed to be by a few pixels. Same with hitting play in the Unity editor, or adjusting other values. Other times, such as when we save the scene, items will explode away from the center of the UI for no discernable reason. We've tried setting the anchors to run at different times and messed around with different scene configurations with no fix.

Thanks in advance!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISprite moves about when anchored if the aspect ratio is set
« Reply #1 on: April 27, 2015, 04:30:07 PM »
Sounds like you forgot to change the pivot to bottom -- ideally bottom left.