Skip to content

Fixed a bug with canceling an old sequence causing a new unrelated sequence to get canceled #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DoubleLoopAndy
Copy link

  • Check that the sequence counter matches the requested counter before canceling the tweens in the sequence. To reproduce the original behavior, save the uniqueId of a finished sequence, start a new sequence (it should occupy the same slot), and then attempt to cancel the original uniqueId. The new sequence will get canceled before it has a chance to do anything.

…e canceling the tweens in the sequence. To reproduce the original behavior, save the uniqueId of a finished sequence, start a new sequence (it should occupy the same slot), and then attempt to cancel the original uniqueId. The new sequence will get canceled before it has a chance to do anything.
int tweenId = seq.current.tween.uniqueId;
int tweenIndex = tweenId & 0xFFFF;
removeTween(tweenIndex);
if (seq.counter == backCounter) {
Copy link
Author

@DoubleLoopAndy DoubleLoopAndy Aug 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this test, an unrelated sequence can be canceled.

@breadnone
Copy link

This is actually happening, and in my case it's quite random

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants