Author Topic: parent healthbar to gameobject.  (Read 2463 times)

FuzzySmurf

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
parent healthbar to gameobject.
« on: December 13, 2013, 02:04:21 AM »
Hi, I just had a simple question. is their a better way I can parent a UISlider to the gameobject?

my current solution is to do gameobject.transform.position = this.transform.position;
in Update, but I feel theirs a better way. I think its in Anchor, but when i search for the function, it just gives me a boolean. is their a better way, or a built in NGUI call for this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: parent healthbar to gameobject.
« Reply #1 on: December 13, 2013, 05:46:58 AM »
Watch the video on anchors in 3.0.7. The last thing I do is make a widget follow a 3D object.