Author Topic: Sprite Shrinks instead of moving when anchored  (Read 3121 times)

indeisoft

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Sprite Shrinks instead of moving when anchored
« on: November 26, 2014, 09:21:40 AM »
Hello,

I Have this layout inside a UIPanel
UILabel1
UI2DSprite
UILabel2

The content of the labels changes at runtime and is multi line

I  set the anchors of all 3 like this :
left and right to the UIPanel
Bottom to none
Top -each one to the one before it

when I put text in UILabel1 the sprite shrinks instead of moving down
when I click on snap in the sprite Widget in the inspector becomes OK

How to set it properly? or maybe how to call that snap in runtime?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sprite Shrinks instead of moving when anchored
« Reply #1 on: November 26, 2014, 08:36:57 PM »
Change the pivot of all widgets to top-left. It won't work properly if it's centered.