How to play Animations while Time.timeScale= 0;

Hi I have implemented a pause menu and in doing so i set the timeScale to 0. but this wont allow animation(DoTween) to operate.

Is there away around this?

Thanks

Daniel

8 Likes

When you make a tween with DOTween, it creates a “Tweener” object that you can modify. The Tweener has a SetUpdate() function with a few overloads… if you just call SetUpdate(true), it will update using unscaled time.

Example:
myVariable.DoLocalMove(…).SetUpdate(true);

Also, if you’re working with animators, you can change their update mode in the inspector to “Unscaled Time”

61 Likes

cool thanks for the reply

1 Like

Still relevant! Helped me just today.

2 Likes

Seconding the same thing AhmenX stated in February: this worked wonders for me!

1 Like

Thanks!

yes your answer is right helped me just today…
can you suggest any good vedio tutorials that can help me in learning Dotween?

Thanks.helped

Nice clear answer. Thanks!

Hell of an answer!

thanks for the answer

I just want to add that if you are using a sequence, then SetUpdate(true) when instantiating the sequence.

Example:
sequence = DOTween.Sequence().SetUpdate(true);

2 Likes

It’s still working! It’s been very helpful to me.