From 0b79c49df9c8f7fa56d29419d088f5143b9625f2 Mon Sep 17 00:00:00 2001 From: Peyman Narimani Date: Sat, 14 May 2022 04:38:17 +0430 Subject: [PATCH] Fixed errors with UniTask --- .../Zenject/Source/Runtime/Factories/FactoryProviderWrapper.cs | 2 +- .../Zenject/Source/Runtime/Factories/PlaceholderFactoryBase.cs | 2 +- .../Async/Addressable/TestAddressableFactory.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UnityProject/Assets/Plugins/Zenject/Source/Runtime/Factories/FactoryProviderWrapper.cs b/UnityProject/Assets/Plugins/Zenject/Source/Runtime/Factories/FactoryProviderWrapper.cs index 059c0880b..1d6718c7d 100644 --- a/UnityProject/Assets/Plugins/Zenject/Source/Runtime/Factories/FactoryProviderWrapper.cs +++ b/UnityProject/Assets/Plugins/Zenject/Source/Runtime/Factories/FactoryProviderWrapper.cs @@ -60,7 +60,7 @@ public async if (instance is IAsyncInject asyncInject) { - await asyncInject; + await asyncInject.Task; instance = asyncInject.Result; } diff --git a/UnityProject/Assets/Plugins/Zenject/Source/Runtime/Factories/PlaceholderFactoryBase.cs b/UnityProject/Assets/Plugins/Zenject/Source/Runtime/Factories/PlaceholderFactoryBase.cs index 2497e8525..3f5ef3832 100644 --- a/UnityProject/Assets/Plugins/Zenject/Source/Runtime/Factories/PlaceholderFactoryBase.cs +++ b/UnityProject/Assets/Plugins/Zenject/Source/Runtime/Factories/PlaceholderFactoryBase.cs @@ -82,7 +82,7 @@ protected async if (result is IAsyncInject asyncInject) { - await asyncInject; + await asyncInject.Task; result = asyncInject.Result; } diff --git a/UnityProject/Assets/Plugins/Zenject/Tests/IntegrationTests/Async/Addressable/TestAddressableFactory.cs b/UnityProject/Assets/Plugins/Zenject/Tests/IntegrationTests/Async/Addressable/TestAddressableFactory.cs index e5a611bdd..4b1ffc38c 100644 --- a/UnityProject/Assets/Plugins/Zenject/Tests/IntegrationTests/Async/Addressable/TestAddressableFactory.cs +++ b/UnityProject/Assets/Plugins/Zenject/Tests/IntegrationTests/Async/Addressable/TestAddressableFactory.cs @@ -140,7 +140,7 @@ public IEnumerator FactoryInstantiatePrefabForComponent_Pooled() } #if UNITASK_PLUGIN - private static async void ContinueTaskWith(UniTask, Action continuation) + private static async void ContinueTaskWith(UniTask task, Action continuation) #else private static async void ContinueTaskWith(Task task, Action continuation) #endif