Skip to content
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

Fix a problem in dotween where an extra update would run after canceling #485

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

hadashiA
Copy link
Contributor

@hadashiA hadashiA commented Aug 31, 2023

@hadashiA
Copy link
Contributor Author

hadashiA commented Sep 7, 2023

#378 #429 #468
These do not seem to be improved by modifying the timing of the originalUpdateAction.
I'll investigate further.

@hadashiA
Copy link
Contributor Author

hadashiA commented Sep 7, 2023

📝 Update process for each frame of DOTween.

flowchart TB
    apply["ApplyTween"]
    
    onupdate["tween.onUpdate"]  
    kill["tween.Kill"]
    null["Null error log"]

    checkToken{"CancellationToken.IsCancellationRequested ?"}
    checkTween{"kill or completed ?"}
    checkDestroy{"destroyed ?"}

    style null stroke:#f66
    style kill stroke:#ff3
    style checkToken stroke:#ff3

    apply -->checkDestroy
    checkDestroy-->|No| onupdate
    checkDestroy-->|Yes| null
    onupdate-->checkToken
    checkToken-->|Yes| kill-->checkTween
    checkToken-->|No| checkTween
    checkTween-->|No| apply
    checkTween-->|Yes| Done
Loading

@hadashiA hadashiA marked this pull request as draft September 7, 2023 07:12
@hadashiA hadashiA marked this pull request as ready for review September 7, 2023 07:50
@hadashiA
Copy link
Contributor Author

hadashiA commented Sep 7, 2023

After discussion, Use CancellationToken.Register to stop the tween without delay.

@neuecc
Copy link
Member

neuecc commented Sep 8, 2023

thanks, I've checked, ok to merge.

@hadashiA hadashiA merged commit 47a3f09 into master Sep 8, 2023
4 checks passed
@hadashiA hadashiA deleted the hadashiA/fix-dotween branch September 8, 2023 08:16
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