Update Prime Tween Inside Custom Tick #135
-
Hi. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
It would also be great to be able to update manually not the whole tween manager, but separately stored tweens, because for UI it's ok that tweens are updated automatically, but when using tweens for the camera and other game logic it's important to control the execution order. |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm afraid PrimeTween wasn't designed with this use case in mind and there is currently no way to update PrimeTween manually. I'm not sure if adding this functionality will benefit a broader audience, but PrimeTween comes with full source code so adding this feature yourself should be relatively easy. But maybe knowing the details of how PrimeTween updates its animation can work as an alternative solution for you so you can be confident when things happen:
|
Beta Was this translation helpful? Give feedback.
-
Hey @sergiyha @TylerTemp, good news! I added an experimental feature that lets you update tweens manually. To enable it, add the Then you'll be able to manually update PrimeTweenManager from a script: void Update() => PrimeTweenConfig.ManualUpdate(UpdateType.Update);
void LateUpdate() {
PrimeTweenConfig.ManualUpdate(UpdateType.LateUpdate);
PrimeTweenConfig.ManualUpdateApplyStartValues(UpdateType.Update);
PrimeTweenConfig.ManualUpdateApplyStartValues(UpdateType.LateUpdate);
}
void FixedUpdate() => PrimeTweenConfig.ManualUpdate(UpdateType.FixedUpdate); You can also provide custom @PalliativeX Good news for you too 😀 |
Beta Was this translation helpful? Give feedback.
Hey @sergiyha @TylerTemp, good news!
I added an experimental feature that lets you update tweens manually. To enable it, add the
PRIME_TWEEN_EXPERIMENTAL
to the ‘Project Settings / Player / Scripting Define Symbols’.Then you'll be able to manually update PrimeTweenManager from a script:
You can also provide custom
deltaTime
…