Skip to content

Stop the nested (inner/child) tween when the parent Sequence isAlive. #95

Answered by KyryloKuzyk
flo-wolf asked this question in General
Discussion options

You must be logged in to vote

Hey Florian,

Not allowing to manipulate nested (inner) tweens and sequences is a design decision. PrimeTween logs an error when you try to call any method or change any property of the nested animation. In your case the error comes from _innerSequence.Stop();, not from the _innerSequence = innerSequence; assignment.

The reasoning behind this decision was the following: sequence is a logical union of all its nested animations that act as a whole. When you add an animation to the parent sequence, this animation becomes dependent on the parent sequence, meaning that it no longer updates itself directly. Instead, the parent sequence takes control over all its nested animations and it's no lon…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@flo-wolf
Comment options

@flo-wolf
Comment options

@KyryloKuzyk
Comment options

@flo-wolf
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
2 participants
Converted from issue

This discussion was converted from issue #94 on August 31, 2024 08:03.