Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: rain on June 25, 2012, 11:18:44 AM
-
Hi!
I have a sidebar menu which has buttons arranged with a UIGrid. I have these buttons fade in by firing their TweenPosition scripts, but when I want to do it backwards, a few of them just instantly "teleport" back to the original position, not respecting the duration.
Did I mess something up or is it just a weird problem?
-
I'm not sure what you could have done but it does sound like something you did messed it up as I just tried it and it seems to work fine. Double check you tween duration?
-
Debug.Log prints right values.
In editor mode if I modify the duration to 10 and fire it manually, i get the same result :(
-
Additional info: The grid is inside a Soft-clipped panel.
-
First question that I always ask in similar situations: Is the UIPanel's 'Static' property checked?
There is no reason why "a few" would not respect the tween while the rest would. I'd look at them closer if I was you.
-
The checkbox is not checked
-
Also, i'm changing the duration of the tween after starting it forward, making the reverse tweening time different.
By the way I solved the problem by destroying the current tweenpositions, adding new tweenposition components and reassigning their values via code, but replacing the destination and starting location, then playing them in forward direction.