Skip to content

Performance issues with Tween.StopAll #128

Answered by KyryloKuzyk
myangel0258 asked this question in FAQ
Discussion options

You must be logged in to vote

Hey!

I would like to start by saying that both PrimeTween's Tween.StopAll(target) and DOTween.Kill(targetOrId) don't support stopping all animations on a particular GameObject hierarchy. The GameObject type is rarely an animation target unless you're doing something like Tween.Custom(gameObject, ...). So, if you have a position animation that has a Transform target, it would not be possible to stop it by passing GameObject target.

In regards to performance, both PrimeTween's Tween.StopAll(target) and DOTween.Kill(targetOrId) are not the best choices if you call them frequently on many objects because they iterate over all running animations. And if you do that for all running animations, …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@myangel0258
Comment options

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