Author Topic: Setting anchors target (center, left, right, ...)  (Read 1588 times)

xbelt

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 9
    • View Profile
Setting anchors target (center, left, right, ...)
« on: March 28, 2014, 07:20:16 AM »
Hello,

how do I set the target of an anchor? I know that I can set the target by leftAnchor.target = transform. But how can I choose if the values are relative to the target's left, right or center?
Kind regards

Lukas Häfliger

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Setting anchors target (center, left, right, ...)
« Reply #1 on: March 28, 2014, 09:24:11 AM »
Look at the last UIRect.SetAnchor function and what it does inside.