Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: pixelplacement on October 13, 2013, 12:12:35 AM
-
Just a heads up that UITweener's Sample method does not work with the current version of NGUI (3.0.2) since it does not internally set the mFactor value to the factor you pass along. If you add a line to set mFactor before this method completes it will correctly apply your requested factor to the tween:
Maybe around line 268 just add:
//Synchronize mFactor
mFactor = factor;
-
It's not supposed to. It's supposed to just sample it, but it shouldn't change the 'mFactor'. Why are you sampling things manually? I can make the tweenFactor property have a setter if you need.
-
We need to be able to play a tween in reverse at any time even if it wasn't previously played forward so we need to fast-forward to the end of the tween and then play it in reverse. It seems the only way to make this happen is by getting the mFactor synced up to that Sample method call. Is there another route to achieve this? If not making that tweenFactor have a setter would be awesome for this purpose.
Thanks!
-
UITweener.Play lets you play it in reverse.
-
Correct, but if we want to play backwards starting at the end of the tween (the To value) we would need to first sample to the To value and then play in reverse and this is where being able to have Sample actually set to the provided factor is handy.