You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When canceling a LeanTween sequence immediately after adding actions, the actions continue to execute even though the sequence was canceled. This behavior suggests that the cancellation does not immediately stop the sequence, leading to unexpected outputs.
Plattform
LeanTween version 2.50
Unity 2023.2.19f1
Steps to reproduce
Create a sequence.
Add a delay and some actions to the sequence.
Cancel the sequence shortly after starting it.
Observe that the actions in the sequence still execute.
Example code
publicclassLeanTweenCancelTest:MonoBehaviour{privatevoidStart(){SequenceTest();SequenceTest();SequenceTest();SequenceTest();}privateasyncvoidSequenceTest(){LTSeqseq=LeanTween.sequence();Debug.Log($"[{Time.time}] Sequence started");seq.append(1f);// 1 second delayseq.append(()=>Debug.Log($"[{Time.time}] I have started"));seq.append(LeanTween.move(gameObject,Vector3.one,1f));seq.append(()=>Debug.Log($"[{Time.time}] I'm done"));awaitTask.Delay(100);// Wait for 100 millisecondsDebug.Log($"[{Time.time}] Cancelling sequence with ID {seq.id}");LeanTween.cancel(seq.id);}}
Expected behavior
The sequence should stop immediately upon calling LeanTween.cancel, and no further actions should be executed.
console output:
[0] Sequence started
[0] Sequence started
[0] Sequence started
[0] Sequence started
[0,01999999] Cancelling sequence with ID xxxxxx
[0,01999999] Cancelling sequence with ID xxxxxx
[0,01999999] Cancelling sequence with ID xxxxxx
[0,01999999] Cancelling sequence with ID xxxxxx
Actual behavior
Despite calling LeanTween.cancel, the actions in the sequence continue to execute.
console output:
[0] Sequence started
[0] Sequence started
[0] Sequence started
[0] Sequence started
[0,01999999] Cancelling sequence with ID xxxxxx
[0,01999999] Cancelling sequence with ID xxxxxx
[0,01999999] Cancelling sequence with ID xxxxxx
[0,01999999] Cancelling sequence with ID xxxxxx
[0,9922831] I have started
[1,986698] I'm done
[1,986698] I'm done
[1,986698] I'm done
The text was updated successfully, but these errors were encountered:
Issue Description
When canceling a LeanTween sequence immediately after adding actions, the actions continue to execute even though the sequence was canceled. This behavior suggests that the cancellation does not immediately stop the sequence, leading to unexpected outputs.
Plattform
LeanTween version 2.50
Unity 2023.2.19f1
Steps to reproduce
Example code
Expected behavior
The sequence should stop immediately upon calling LeanTween.cancel, and no further actions should be executed.
console output:
Actual behavior
Despite calling LeanTween.cancel, the actions in the sequence continue to execute.
console output:
The text was updated successfully, but these errors were encountered: