Merge remote-tracking branch 'origin/master'
commit
a40f89a922
|
@ -14,7 +14,8 @@ Provides an efficient allocation free async/await integration to Unity.
|
|||
* Highly compatible behaviour with Task/ValueTask/IValueTaskSource
|
||||
|
||||
Techinical details, see blog post: [UniTask v2 — Zero Allocation async/await for Unity, with Asynchronous LINQ
|
||||
](https://medium.com/@neuecc/unitask-v2-zero-allocation-async-await-for-unity-with-asynchronous-linq-1aa9c96aa7dd)
|
||||
](https://medium.com/@neuecc/unitask-v2-zero-allocation-async-await-for-unity-with-asynchronous-linq-1aa9c96aa7dd)
|
||||
Advanced tips, see blog post: [Extends UnityWebRequest via async decorator pattern — Advanced Techniques of UniTask](https://medium.com/@neuecc/extends-unitywebrequest-via-async-decorator-pattern-advanced-techniques-of-unitask-ceff9c5ee846)
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
|
|
@ -732,7 +732,7 @@ namespace Cysharp.Threading.Tasks
|
|||
return await await task;
|
||||
}
|
||||
|
||||
public static async UniTask Unwrap<T>(this UniTask<UniTask> task)
|
||||
public static async UniTask Unwrap(this UniTask<UniTask> task)
|
||||
{
|
||||
await await task;
|
||||
}
|
||||
|
@ -741,22 +741,42 @@ namespace Cysharp.Threading.Tasks
|
|||
{
|
||||
return await await task;
|
||||
}
|
||||
|
||||
public static async UniTask<T> Unwrap<T>(this Task<UniTask<T>> task, bool continueOnCapturedContext)
|
||||
{
|
||||
return await await task.ConfigureAwait(continueOnCapturedContext);
|
||||
}
|
||||
|
||||
public static async UniTask Unwrap<T>(this Task<UniTask> task)
|
||||
public static async UniTask Unwrap(this Task<UniTask> task)
|
||||
{
|
||||
await await task;
|
||||
}
|
||||
|
||||
public static async UniTask Unwrap(this Task<UniTask> task, bool continueOnCapturedContext)
|
||||
{
|
||||
await await task.ConfigureAwait(continueOnCapturedContext);
|
||||
}
|
||||
|
||||
public static async UniTask<T> Unwrap<T>(this UniTask<Task<T>> task)
|
||||
{
|
||||
return await await task;
|
||||
}
|
||||
|
||||
public static async UniTask<T> Unwrap<T>(this UniTask<Task<T>> task, bool continueOnCapturedContext)
|
||||
{
|
||||
return await (await task).ConfigureAwait(continueOnCapturedContext);
|
||||
}
|
||||
|
||||
public static async UniTask Unwrap<T>(this UniTask<Task> task)
|
||||
public static async UniTask Unwrap(this UniTask<Task> task)
|
||||
{
|
||||
await await task;
|
||||
}
|
||||
|
||||
public static async UniTask Unwrap(this UniTask<Task> task, bool continueOnCapturedContext)
|
||||
{
|
||||
await (await task).ConfigureAwait(continueOnCapturedContext);
|
||||
}
|
||||
|
||||
#if UNITY_2018_3_OR_NEWER
|
||||
|
||||
sealed class ToCoroutineEnumerator : IEnumerator
|
||||
|
|
|
@ -46,6 +46,11 @@ namespace Cysharp.Threading.Tasks
|
|||
this.continuationAction = null;
|
||||
}
|
||||
|
||||
public AssetBundleRequestAllAssetsAwaiter GetAwaiter()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public bool IsCompleted => asyncOperation.isDone;
|
||||
|
||||
public UnityEngine.Object[] GetResult()
|
||||
|
|
Loading…
Reference in New Issue