Tween startValue is not applied immediately (setImmediately)
#158
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
I'm using PrimeTween v1.2.2 (Asset Store) and Unity 6 (6000.0.26f1) |
Beta Was this translation helpful? Give feedback.
-
|
Hey, thank you for creating a detailed report with examples! This behaviour is by design: PrimeTween doesn't assume you wish to apply the The simplest example of this problem is this one: Sequence.Create()
.ChainDelay(1f)
.Chain(Tween.PositionX(transform, 0f, 10f, duration: 1f));What the above code should do?
PrimeTween selects option 1 because it gives the user full control over how the animation behaves. If the user wants the behaviour of option 2, they can modify the So, to achieve the desired behavior in your case, simply add this line before creating the sequence: barB.fillAmount = 0f;PrimeTween also comes with DOTween adapter, which supports
Yeah, I can see how it may seem inconsistent in this particular example. I need to think more about this in the meantime, but I'm afraid it would be too risky to change the default behavior because PrimeTween already has thousands of users, and such a change may break their projects. Related question: https://discussions.unity.com/t/primetween-high-performance-animations-and-sequences/926420/300 |
Beta Was this translation helpful? Give feedback.




Hey, thank you for creating a detailed report with examples!
This behaviour is by design: PrimeTween doesn't assume you wish to apply the
startValueimmediately upon creation of the tween because that's not what the user wants in 100% of cases.The simplest example of this problem is this one:
What the above code should do?
position.ximmediately to 0f, then wait for 1 second, then play the animation from 0 to 10.PrimeTween selects option 1 because it gives the user full control over how the animation behaves. If the user wants th…