Author Topic: Tween UIWidget Anchor  (Read 2485 times)

viqtor

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Tween UIWidget Anchor
« on: May 11, 2014, 06:36:40 AM »
Hello,
Is there a way to tween the UIWidget's Anchor? How can one write a simple script to do so? I'm thinking it should have a From Vector4 with the original offsets and a TO Vector4 with the final offsets. NGUI should definitely have this.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tween UIWidget Anchor
« Reply #1 on: May 11, 2014, 08:27:28 AM »
Each anchor is 2 values, not 1. So you'd be tweening 8 things. It wouldn't be an intuitive tween.

TweenPosition, TweenWidth and TweenHeight are all capable of adjusting the anchors.