Skip to content

Update Prime Tween Inside Custom Tick #135

Answered by KyryloKuzyk
sergiyha asked this question in General
Discussion options

You must be logged in to vote

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:

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 deltaTime

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@TylerTemp
Comment options

@KyryloKuzyk
Comment options

Comment options

You must be logged in to vote
3 replies
@nscimerical
Comment options

@KyryloKuzyk
Comment options

@nscimerical
Comment options

Answer selected by KyryloKuzyk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants