From f1ac46905828c6a2dd37b8d427d2a8ee745097c1 Mon Sep 17 00:00:00 2001 From: neuecc Date: Fri, 5 Jun 2020 00:43:03 +0900 Subject: [PATCH] Fix UniTask.Defer --- src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs index a58df9a..915ee78 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/UniTask.Factory.cs @@ -204,7 +204,7 @@ namespace Cysharp.Threading.Tasks if (f == null) throw new InvalidOperationException("Can't call twice."); task = f(); - awaiter = f().GetAwaiter(); + awaiter = task.GetAwaiter(); return task.Status; } @@ -246,7 +246,7 @@ namespace Cysharp.Threading.Tasks if (f == null) throw new InvalidOperationException("Can't call twice."); task = f(); - awaiter = f().GetAwaiter(); + awaiter = task.GetAwaiter(); return task.Status; }