Author Topic: uilabel won't update  (Read 1232 times)


  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 3
    • View Profile
uilabel won't update
« on: January 12, 2015, 08:17:15 AM »
I've added a sprite, added a label with resizeHeight as overflow option, anchored to the sprite on all sides except the bottom.

One would think that the vertical position would then be fixed to however I set it. However, if I add text to it in Start() of an attached script, the vertical position is all wrong. If I then select it in the editor and add/remove text, the position moves towards the position I set the top to in the editor.

The hackaround is to add a for loop that adds and removes a space at the end of the text 10 times, and then enables the gameobject.


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: uilabel won't update
« Reply #1 on: January 13, 2015, 03:09:03 PM »
Just call UpdateAnchors() on it.