Author Topic: Dynamically changing tweenTarget lags tween  (Read 2466 times)

shik

  • Guest
Dynamically changing tweenTarget lags tween
« on: April 02, 2013, 05:12:28 PM »
or at least that is what seems to be happening...

I have a ButtonTween that has its target changed whenever the user does something.  There are only two potential options (screens) currently.  When the user selects the first screen (screen1), the buttons tweenTarget is set to screen1.  If the user switches to screen2, the buttons tweenTarget is updated to screen2.  Pretty straightforward.

The problem comes up when you click the button.  If the current target is not what it was initialized to the first time, the tweening object immediately changes to its final state (regardless of what I have set the duration to.  If the tweenTarget is set to the first value it received (screen1 in the example above), it tweens correctly even if it was changed to screen2 and then changed back.

I use
  1. UIButtonTween.tweenTarget = GameObject
to change the tween target.
Has anyone encountered a similar problem before?

shik

  • Guest
Re: Dynamically changing tweenTarget lags tween
« Reply #1 on: April 04, 2013, 01:45:31 PM »
No one else has had this happen?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamically changing tweenTarget lags tween
« Reply #2 on: April 05, 2013, 12:18:25 PM »
Did you Reset() the tween?