Skip to content

Why is infinty tweening within a sequence not allowed? #102

Closed Answered by KyryloKuzyk
kyubuns asked this question in FAQ
Discussion options

You must be logged in to vote

Hi, thanks for the question!

This was a design decision not to allow infinite tweens inside sequences. In your particular use case it looks reasonable, but there are many other corner cases when an infinite animation inside the sequence would not make sense and will break other things. For example, if infinite tweens were allowed inside sequences:

  • All these APIs would return infinite values, which can easily break any user's code that relies on them: sequence.progress/progressTotal/duration/durationTotal.
  • Using Sequence.Chain() would not be allowed because the insertion point would be unknown (infinite).
  • Using Sequence.Create(cycles: numCycles) or sequence.SetRemainingCycles() would not …

Replies: 1 comment 1 reply

Comment options

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

Answer selected by KyryloKuzyk
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