Author Topic: Changing Anchor Offset in UIWidget from code  (Read 1968 times)

KeithT

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 55
    • View Profile
Changing Anchor Offset in UIWidget from code
« on: June 30, 2015, 04:48:39 AM »
Trying to change the circled value from code with no luck, any suggestions?

....gameObject.GetComponent<UIWidget>().topAnchor...

Thanks in advance for any assistance.

KeithT

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 55
    • View Profile
Re: Changing Anchor Offset in UIWidget from code
« Reply #1 on: July 01, 2015, 04:11:26 AM »
Scratch that, after a load more hunting around is actually pretty simple:

....gameObject.GetComponent<UIWidget>().topAnchor.absolute = 300;