Merge pull request #189 from IllusionCui/master
[DoTween]:fix CancellationToken can't stop UniTaskmaster
commit
40d2d2fe06
|
@ -223,6 +223,17 @@ namespace Cysharp.Threading.Tasks
|
||||||
|
|
||||||
void OnCompleteCallbackDelegate()
|
void OnCompleteCallbackDelegate()
|
||||||
{
|
{
|
||||||
|
if (cancellationToken.IsCancellationRequested)
|
||||||
|
{
|
||||||
|
if (this.cancelBehaviour == TweenCancelBehaviour.KillAndCancelAwait
|
||||||
|
|| this.cancelBehaviour == TweenCancelBehaviour.KillWithCompleteCallbackAndCancelAwait
|
||||||
|
|| this.cancelBehaviour == TweenCancelBehaviour.CompleteAndCancelAwait
|
||||||
|
|| this.cancelBehaviour == TweenCancelBehaviour.CompleteWithSeqeunceCallbackAndCancelAwait
|
||||||
|
|| this.cancelBehaviour == TweenCancelBehaviour.CancelAwait)
|
||||||
|
{
|
||||||
|
canceled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (canceled)
|
if (canceled)
|
||||||
{
|
{
|
||||||
core.TrySetCanceled(cancellationToken);
|
core.TrySetCanceled(cancellationToken);
|
||||||
|
|
Loading…
Reference in New Issue