Merge remote-tracking branch 'origin/master'
commit
a40f89a922
|
@ -15,6 +15,7 @@ Provides an efficient allocation free async/await integration to Unity.
|
||||||
|
|
||||||
Techinical details, see blog post: [UniTask v2 — Zero Allocation async/await for Unity, with Asynchronous LINQ
|
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 -->
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
|
|
|
@ -732,7 +732,7 @@ namespace Cysharp.Threading.Tasks
|
||||||
return await await task;
|
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;
|
await await task;
|
||||||
}
|
}
|
||||||
|
@ -742,21 +742,41 @@ namespace Cysharp.Threading.Tasks
|
||||||
return await await task;
|
return await await task;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async UniTask Unwrap<T>(this Task<UniTask> 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(this Task<UniTask> task)
|
||||||
{
|
{
|
||||||
await await 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)
|
public static async UniTask<T> Unwrap<T>(this UniTask<Task<T>> task)
|
||||||
{
|
{
|
||||||
return await await task;
|
return await await task;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async UniTask Unwrap<T>(this UniTask<Task> 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(this UniTask<Task> task)
|
||||||
{
|
{
|
||||||
await await 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
|
#if UNITY_2018_3_OR_NEWER
|
||||||
|
|
||||||
sealed class ToCoroutineEnumerator : IEnumerator
|
sealed class ToCoroutineEnumerator : IEnumerator
|
||||||
|
|
|
@ -46,6 +46,11 @@ namespace Cysharp.Threading.Tasks
|
||||||
this.continuationAction = null;
|
this.continuationAction = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AssetBundleRequestAllAssetsAwaiter GetAwaiter()
|
||||||
|
{
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsCompleted => asyncOperation.isDone;
|
public bool IsCompleted => asyncOperation.isDone;
|
||||||
|
|
||||||
public UnityEngine.Object[] GetResult()
|
public UnityEngine.Object[] GetResult()
|
||||||
|
|
Loading…
Reference in New Issue