Skip to content

Commit a27545e

Browse files
authored
Don't introduce GetAwaiter extension methods conflicting with Unity's Awaitable in 2023.1+ (#11178)
Signed-off-by: Simon Ferquel <[email protected]> Signed-off-by: Simon Ferquel <[email protected]>
1 parent 76efbc8 commit a27545e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Assets/MRTK/Core/Utilities/Async/AwaiterExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public static SimpleCoroutineAwaiter GetAwaiter(this WaitWhile instruction)
7676
return GetAwaiterReturnVoid(instruction);
7777
}
7878

79+
#if !UNITY_2023_1_OR_NEWER
7980
public static SimpleCoroutineAwaiter<AsyncOperation> GetAwaiter(this AsyncOperation instruction)
8081
{
8182
return GetAwaiterReturnSelf(instruction);
@@ -104,6 +105,7 @@ public static SimpleCoroutineAwaiter<Object> GetAwaiter(this AssetBundleRequest
104105
InstructionWrappers.AssetBundleRequest(awaiter, instruction)));
105106
return awaiter;
106107
}
108+
#endif
107109

108110
public static SimpleCoroutineAwaiter<T> GetAwaiter<T>(this IEnumerator<T> coroutine)
109111
{

0 commit comments

Comments
 (0)