Author Topic: UILabel Anchors  (Read 2890 times)

Garrancho

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
UILabel Anchors
« on: February 02, 2015, 10:48:40 AM »
Hi

Is it possible to remove the anchors from UILabel in runtime

The problem is that in runtime i have a gameobject with UILabel that as anchors (type: advanced).
Then, in play mode, this gameobject becomes child of a table.

The problem is that because of the anchors values the gameobject doesn't align with other gameobjects from that table

I use Playmaker and i can't find the way to fix this.

Can someone help me?

ps: to change values from the UILabel script, i drag it to playmaker states, then "set property" ..... but i can't find the anchors values

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel Anchors
« Reply #1 on: February 03, 2015, 10:38:50 AM »
widget.SetAnchors(null), or just set widget.leftAnchor.target = null, widget.rightAnchor.target = null, etc.

Garrancho

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: UILabel Anchors
« Reply #2 on: February 03, 2015, 03:29:13 PM »
I don't have that option.

Do i have to write it in a script?

If so, that's a big problem for me cause i don't know how to do it....

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel Anchors
« Reply #3 on: February 05, 2015, 08:45:45 AM »
Yes, it's code. I can't suggest much with PlayMaker as it's not something I created. You would need to ask its author.