From 7fae4156895dedf15d107e2b5996a6ff224bdf2a Mon Sep 17 00:00:00 2001 From: hadashiA Date: Thu, 7 Sep 2023 10:03:55 +0900 Subject: [PATCH] Reduce the times of AwakeMonitor checking --- .../Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs index 811f977..48fbdcc 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/Triggers/AsyncDestroyTrigger.cs @@ -83,7 +83,7 @@ namespace Cysharp.Threading.Tasks.Triggers public bool MoveNext() { - if (trigger.called) return false; + if (trigger.called || trigger.awakeCalled) return false; if (trigger == null) { trigger.OnDestroy();