UniTaskExtensions Class
Namespace: Cysharp.Threading.Tasks
Assembly: cs.temp.dll.dll
public static class UniTaskExtensions
Inheritance
System.Object → UniTaskExtensionsMembers
Methods
Methods
AsTask(UniTask)
public static Task AsTask(this UniTask task)
Parameters
task
UniTask
Returns
- Task
AsTask<T>(UniTask<T>)
public static Task<T> AsTask<T>(this UniTask<T> task)
Parameters
task
UniTask<T>
Returns
- Task<T>
Type Parameters
T
AsUniTask(Task, Boolean)
Convert Task -> UniTask.
public static UniTask AsUniTask(this Task task, bool useCurrentSynchronizationContext = true)
Parameters
task
TaskuseCurrentSynchronizationContext
System.Boolean
Returns
AsUniTask<T>(Task<T>, Boolean)
Convert Task[T] -> UniTask[T].
public static UniTask<T> AsUniTask<T>(this Task<T> task, bool useCurrentSynchronizationContext = true)
Parameters
task
Task<T>useCurrentSynchronizationContext
System.Boolean
Returns
- UniTask<T>
Type Parameters
T
ContinueWith(UniTask, Action)
public static UniTask ContinueWith(this UniTask task, Action continuationFunction)
Parameters
task
UniTaskcontinuationFunction
System.Action
Returns
ContinueWith(UniTask, Func<UniTask>)
public static UniTask ContinueWith(this UniTask task, Func<UniTask> continuationFunction)
Parameters
Returns
ContinueWith<T>(UniTask, Func<T>)
public static UniTask<T> ContinueWith<T>(this UniTask task, Func<T> continuationFunction)
Parameters
task
UniTaskcontinuationFunction
System.Func<T>
Returns
- UniTask<T>
Type Parameters
T
ContinueWith<T>(UniTask, Func<UniTask<T>>)
public static UniTask<T> ContinueWith<T>(this UniTask task, Func<UniTask<T>> continuationFunction)
Parameters
Returns
- UniTask<T>
Type Parameters
T
ContinueWith<T>(UniTask<T>, Action<T>)
public static UniTask ContinueWith<T>(this UniTask<T> task, Action<T> continuationFunction)
Parameters
task
UniTask<T>continuationFunction
System.Action<T>
Returns
Type Parameters
T
ContinueWith<T>(UniTask<T>, Func<T, UniTask>)
public static UniTask ContinueWith<T>(this UniTask<T> task, Func<T, UniTask> continuationFunction)
Parameters
Returns
Type Parameters
T
ContinueWith<T, TR>(UniTask<T>, Func<T, TR>)
public static UniTask<TR> ContinueWith<T, TR>(this UniTask<T> task, Func<T, TR> continuationFunction)
Parameters
task
UniTask<T>continuationFunction
System.Func<T, TR>
Returns
- UniTask<TR>
Type Parameters
T
TR
ContinueWith<T, TR>(UniTask<T>, Func<T, UniTask<TR>>)
public static UniTask<TR> ContinueWith<T, TR>(this UniTask<T> task, Func<T, UniTask<TR>> continuationFunction)
Parameters
Returns
- UniTask<TR>
Type Parameters
T
TR
Forget(UniTask)
public static void Forget(this UniTask task)
Parameters
task
UniTask
Forget(UniTask, Action<Exception>, Boolean)
public static void Forget(this UniTask task, Action<Exception> exceptionHandler, bool handleExceptionOnMainThread = true)
Parameters
task
UniTaskexceptionHandler
System.Action<System.Exception>handleExceptionOnMainThread
System.Boolean
Forget<T>(UniTask<T>)
public static void Forget<T>(this UniTask<T> task)
Parameters
task
UniTask<T>
Type Parameters
T
Forget<T>(UniTask<T>, Action<Exception>, Boolean)
public static void Forget<T>(this UniTask<T> task, Action<Exception> exceptionHandler, bool handleExceptionOnMainThread = true)
Parameters
task
UniTask<T>exceptionHandler
System.Action<System.Exception>handleExceptionOnMainThread
System.Boolean
Type Parameters
T
GetAwaiter(UniTask[])
public static UniTask.Awaiter GetAwaiter(this UniTask[] tasks)
Parameters
tasks
UniTask[]
Returns
GetAwaiter(IEnumerable<UniTask>)
public static UniTask.Awaiter GetAwaiter(this IEnumerable<UniTask> tasks)
Parameters
tasks
IEnumerable<UniTask>
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14, UniTask task15))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14, UniTask task15) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13, UniTask task14) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12, UniTask task13) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11, UniTask task12) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10, UniTask task11) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9, UniTask task10) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8, UniTask task9) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7, UniTask task8) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3, UniTask task4))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2, UniTask task3))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2, UniTask task3) tasks)
Parameters
Returns
GetAwaiter((UniTask task1, UniTask task2))
public static UniTask.Awaiter GetAwaiter(this (UniTask task1, UniTask task2) tasks)
Parameters
Returns
GetAwaiter<T>(UniTask<T>[])
public static UniTask<T[]>.Awaiter GetAwaiter<T>(this UniTask<T>[] tasks)
Parameters
tasks
UniTask<T>[]
Returns
Type Parameters
T
GetAwaiter<T>(IEnumerable<UniTask<T>>)
public static UniTask<T[]>.Awaiter GetAwaiter<T>(this IEnumerable<UniTask<T>> tasks)
Parameters
tasks
IEnumerable<UniTask<T>>
Returns
Type Parameters
T
GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11, UniTask<T12> task12))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11, UniTask<T12> task12) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T12
GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11, UniTask<T12> task12, UniTask<T13> task13))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11, UniTask<T12> task12, UniTask<T13> task13) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T12
T13
GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11, UniTask<T12> task12, UniTask<T13> task13, UniTask<T14> task14))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11, UniTask<T12> task12, UniTask<T13> task13, UniTask<T14> task14) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T12
T13
T14
GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11, UniTask<T12> task12, UniTask<T13> task13, UniTask<T14> task14, UniTask<T15> task15))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9, UniTask<T10> task10, UniTask<T11> task11, UniTask<T12> task12, UniTask<T13> task13, UniTask<T14> task14, UniTask<T15> task15) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T12
T13
T14
T15
GetAwaiter<T1, T2>((UniTask<T1> task1, UniTask<T2> task2))
public static UniTask<(T1, T2)>.Awaiter GetAwaiter<T1, T2>(this (UniTask<T1> task1, UniTask<T2> task2) tasks)
Parameters
Returns
Type Parameters
T1
T2
GetAwaiter<T1, T2, T3>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3))
public static UniTask<(T1, T2, T3)>.Awaiter GetAwaiter<T1, T2, T3>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
GetAwaiter<T1, T2, T3, T4>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4))
public static UniTask<(T1, T2, T3, T4)>.Awaiter GetAwaiter<T1, T2, T3, T4>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
GetAwaiter<T1, T2, T3, T4, T5>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5))
public static UniTask<(T1, T2, T3, T4, T5)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
GetAwaiter<T1, T2, T3, T4, T5, T6>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6))
public static UniTask<(T1, T2, T3, T4, T5, T6)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
GetAwaiter<T1, T2, T3, T4, T5, T6, T7>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
T8
GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9>((UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9))
public static UniTask<(T1, T2, T3, T4, T5, T6, T7, T8, T9)>.Awaiter GetAwaiter<T1, T2, T3, T4, T5, T6, T7, T8, T9>(this (UniTask<T1> task1, UniTask<T2> task2, UniTask<T3> task3, UniTask<T4> task4, UniTask<T5> task5, UniTask<T6> task6, UniTask<T7> task7, UniTask<T8> task8, UniTask<T9> task9) tasks)
Parameters
Returns
Type Parameters
T1
T2
T3
T4
T5
T6
T7
T8
T9
ToAsyncLazy(UniTask)
public static AsyncLazy ToAsyncLazy(this UniTask task)
Parameters
task
UniTask
Returns
ToAsyncLazy<T>(UniTask<T>)
public static AsyncLazy<T> ToAsyncLazy<T>(this UniTask<T> task)
Parameters
task
UniTask<T>
Returns
- AsyncLazy<T>
Type Parameters
T
Unwrap<T>(UniTask<UniTask<T>>)
public static UniTask<T> Unwrap<T>(this UniTask<UniTask<T>> task)
Parameters
Returns
- UniTask<T>
Type Parameters
T
Unwrap<T>(UniTask<UniTask>)
public static UniTask Unwrap<T>(this UniTask<UniTask> task)
Parameters
Returns
Type Parameters
T