public void UniTask() { UniTaskCompletionSource <object> deferred = new UniTaskCompletionSource <object>(); var promise = deferred.Task; for (int i = 0; i < N; ++i) { int index = i; promise = promise .ContinueWith(_ => UniTaskHelper.uniVoids[index].Task) .ContinueWith(() => UniTaskHelper.uniVectors[index].Task) .ContinueWith(_ => UniTaskHelper.uniObjects[index].Task); } promise.Forget(); deferred.TrySetResult(Instances.obj); UniTaskHelper.ResolveCompletionSources(); }
public void UniTask() { _ = AwaitUniTasks(); UniTaskHelper.ResolveCompletionSources(); }