Skip to content

[By Design] cyclesDone property never reaches the total number of cycles #116

Answered by KyryloKuzyk
liuxinjia asked this question in General
Discussion options

You must be logged in to vote

Hey, thank you for creating this topic!

Casting float to int has the same behavior as Mathf.FloorToInt() for positive numbers and the current implementation is the intended one.

You can only observe the cyclesDone == settings.cycles if you pause the animation and set the tween.progressTotal = 1f manually. But under normal circumstances animation completes immediately when it reaches the last cycleDone, so it would not be possible to observe that in the Inspector.

You can think of the cyclesDone the following way: it equals to 0 on the first cycle (no cycles completed yet) and equals to cycles - 1 on the last cycle. And the exact moment the last cycle completes, the animation is recycled i…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by liuxinjia
Comment options

You must be logged in to vote
0 replies
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 #115 on October 07, 2024 18:11.