Unity 2023.1.0a15, remove AsyncOperation.GetAwaiter to avoid conflict

master
neuecc 2022-10-24 21:11:49 +09:00
parent ee54559532
commit a879989d1c
1 changed files with 4 additions and 0 deletions

View File

@ -15,11 +15,15 @@ namespace Cysharp.Threading.Tasks
{
#region AsyncOperation
#if !UNITY_2023_1_OR_NEWER
// from Unity2023.1.0a15, AsyncOperationAwaitableExtensions.GetAwaiter is defined in UnityEngine.
public static AsyncOperationAwaiter GetAwaiter(this AsyncOperation asyncOperation)
{
Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation));
return new AsyncOperationAwaiter(asyncOperation);
}
#endif
public static UniTask WithCancellation(this AsyncOperation asyncOperation, CancellationToken cancellationToken)
{