Author Topic: How can I get my button's UISprite to resize to the size of all its children?  (Read 3003 times)

alexh0101

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 30
    • View Profile
I have a gameObject with UIButton and UISprite attached to it.
This gameObject has 2 children: one UI2DSprite and one UILabel.

Also, my label will resize freely.

How can I get my button's UISprite to automatically (and dynamically) get the size of whatever is inside of it?
Do I have to do a script for that?

Thanks in advance

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
EnvelopContent script can do that for you.