Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Sahkan on June 10, 2014, 01:29:43 PM
-
Take this line for example :
playerMinusSign.GetComponent<TweenPosition>().delay = sixthDelayInner
when, running i can see the value change in the box on the inspector, but the tween itself wont change, only if i enter the value manually it will change, why is that ?
On NGUI 3.5.3 ( Cant update, workPlace wanna use this version )
-
I'm not sure what you mean. If the value changes in the inspector, then it obviously changes. Where else should it change?
-
If let's say the valueBox has the value 1 in it and i enter in 10 inside of it (in the inspector), the tween will start 10 seconds after the game is started right ? koo .
Now let's have the same scenario with me changing the "delay" variable by script like i'v showed in the beginning of this thread.
While looking in the inspector, the valueBox shows 10, however, when i start the game, the tweenAnimation will start 1 second after the game has started ( just like it is ignoring the new value and considering the value that was there before the script rewrote the value ) .
-
That's a starting value. Once the tween begins, changing it will have no effect. You need to actually re-start the tween for this kind of change to take effect.
-
That's a starting value. Once the tween begins, changing it will have no effect. You need to actually re-start the tween for this kind of change to take effect.
I found an other solution to what i'v wanted to do, but i guess it will work if i just enabled=false and enabled = true ?
-
No, you restart a tween by calling its PlayForward or PlayReverse functions.
Although it's generally better to use the Begin method, such as TweenPosition.Begin(...);