UnityAsyncExtensions Class
Assembly: cs.temp.dll.dll
public static class UnityAsyncExtensions
Inheritance
System.Object →
UnityAsyncExtensions
Members
Methods
Name |
Description |
GetAsyncClickEventHandler(Button)
|
|
GetAsyncClickEventHandler(Button, CancellationToken)
|
|
GetAsyncEndEditEventHandler(InputField)
|
|
GetAsyncEndEditEventHandler(InputField, CancellationToken)
|
|
GetAsyncEventHandler(UnityEvent, CancellationToken)
|
|
GetAsyncEventHandler<T>(UnityEvent<T>, CancellationToken)
|
|
GetAsyncValueChangedEventHandler(Dropdown)
|
|
GetAsyncValueChangedEventHandler(Dropdown, CancellationToken)
|
|
GetAsyncValueChangedEventHandler(InputField)
|
|
GetAsyncValueChangedEventHandler(InputField, CancellationToken)
|
|
GetAsyncValueChangedEventHandler(Scrollbar)
|
|
GetAsyncValueChangedEventHandler(Scrollbar, CancellationToken)
|
|
GetAsyncValueChangedEventHandler(ScrollRect)
|
|
GetAsyncValueChangedEventHandler(ScrollRect, CancellationToken)
|
|
GetAsyncValueChangedEventHandler(Slider)
|
|
GetAsyncValueChangedEventHandler(Slider, CancellationToken)
|
|
GetAsyncValueChangedEventHandler(Toggle)
|
|
GetAsyncValueChangedEventHandler(Toggle, CancellationToken)
|
|
GetAwaiter(AsyncGPUReadbackRequest)
|
|
GetAwaiter(AsyncOperation)
|
|
GetAwaiter(ResourceRequest)
|
|
OnClickAsAsyncEnumerable(Button)
|
|
OnClickAsAsyncEnumerable(Button, CancellationToken)
|
|
OnClickAsync(Button)
|
|
OnClickAsync(Button, CancellationToken)
|
|
OnEndEditAsAsyncEnumerable(InputField)
|
|
OnEndEditAsAsyncEnumerable(InputField, CancellationToken)
|
|
OnEndEditAsync(InputField)
|
|
OnEndEditAsync(InputField, CancellationToken)
|
|
OnInvokeAsAsyncEnumerable(UnityEvent, CancellationToken)
|
|
OnInvokeAsAsyncEnumerable<T>(UnityEvent<T>, CancellationToken)
|
|
OnInvokeAsync(UnityEvent, CancellationToken)
|
|
OnInvokeAsync<T>(UnityEvent<T>, CancellationToken)
|
|
OnValueChangedAsAsyncEnumerable(Dropdown)
|
|
OnValueChangedAsAsyncEnumerable(Dropdown, CancellationToken)
|
|
OnValueChangedAsAsyncEnumerable(InputField)
|
|
OnValueChangedAsAsyncEnumerable(InputField, CancellationToken)
|
|
OnValueChangedAsAsyncEnumerable(Scrollbar)
|
|
OnValueChangedAsAsyncEnumerable(Scrollbar, CancellationToken)
|
|
OnValueChangedAsAsyncEnumerable(ScrollRect)
|
|
OnValueChangedAsAsyncEnumerable(ScrollRect, CancellationToken)
|
|
OnValueChangedAsAsyncEnumerable(Slider)
|
|
OnValueChangedAsAsyncEnumerable(Slider, CancellationToken)
|
|
OnValueChangedAsAsyncEnumerable(Toggle)
|
|
OnValueChangedAsAsyncEnumerable(Toggle, CancellationToken)
|
|
OnValueChangedAsync(Dropdown)
|
|
OnValueChangedAsync(Dropdown, CancellationToken)
|
|
OnValueChangedAsync(InputField)
|
|
OnValueChangedAsync(InputField, CancellationToken)
|
|
OnValueChangedAsync(Scrollbar)
|
|
OnValueChangedAsync(Scrollbar, CancellationToken)
|
|
OnValueChangedAsync(ScrollRect)
|
|
OnValueChangedAsync(ScrollRect, CancellationToken)
|
|
OnValueChangedAsync(Slider)
|
|
OnValueChangedAsync(Slider, CancellationToken)
|
|
OnValueChangedAsync(Toggle)
|
|
OnValueChangedAsync(Toggle, CancellationToken)
|
|
StartAsyncCoroutine(UnityEngine.MonoBehaviour, Func<CancellationToken, UniTask>)
|
|
ToUniTask(AsyncGPUReadbackRequest, PlayerLoopTiming, CancellationToken, Boolean)
|
|
ToUniTask(AsyncOperation, IProgress<Single>, PlayerLoopTiming, CancellationToken, Boolean)
|
|
ToUniTask(ResourceRequest, IProgress<Single>, PlayerLoopTiming, CancellationToken, Boolean)
|
|
WithCancellation(AsyncGPUReadbackRequest, CancellationToken)
|
|
WithCancellation(AsyncGPUReadbackRequest, CancellationToken, Boolean)
|
|
WithCancellation(AsyncOperation, CancellationToken)
|
|
WithCancellation(AsyncOperation, CancellationToken, Boolean)
|
|
WithCancellation(ResourceRequest, CancellationToken)
|
|
WithCancellation(ResourceRequest, CancellationToken, Boolean)
|
|
Methods
public static IAsyncClickEventHandler GetAsyncClickEventHandler(this Button button)
public static IAsyncClickEventHandler GetAsyncClickEventHandler(this Button button, CancellationToken cancellationToken)
Parameters
button
Button
cancellationToken
System.Threading.CancellationToken
public static IAsyncEndEditEventHandler<string> GetAsyncEndEditEventHandler(this InputField inputField)
Parameters
inputField
InputField
public static IAsyncEndEditEventHandler<string> GetAsyncEndEditEventHandler(this InputField inputField, CancellationToken cancellationToken)
Parameters
inputField
InputField
cancellationToken
System.Threading.CancellationToken
GetAsyncEventHandler(UnityEvent, CancellationToken)
public static AsyncUnityEventHandler GetAsyncEventHandler(this UnityEvent unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent
cancellationToken
System.Threading.CancellationToken
GetAsyncEventHandler<T>(UnityEvent<T>, CancellationToken)
public static AsyncUnityEventHandler<T> GetAsyncEventHandler<T>(this UnityEvent<T> unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent<T>
cancellationToken
System.Threading.CancellationToken
GetAsyncValueChangedEventHandler(Dropdown)
public static IAsyncValueChangedEventHandler<int> GetAsyncValueChangedEventHandler(this Dropdown dropdown)
Parameters
dropdown
Dropdown
GetAsyncValueChangedEventHandler(Dropdown, CancellationToken)
public static IAsyncValueChangedEventHandler<int> GetAsyncValueChangedEventHandler(this Dropdown dropdown, CancellationToken cancellationToken)
Parameters
dropdown
Dropdown
cancellationToken
System.Threading.CancellationToken
public static IAsyncValueChangedEventHandler<string> GetAsyncValueChangedEventHandler(this InputField inputField)
Parameters
inputField
InputField
public static IAsyncValueChangedEventHandler<string> GetAsyncValueChangedEventHandler(this InputField inputField, CancellationToken cancellationToken)
Parameters
inputField
InputField
cancellationToken
System.Threading.CancellationToken
public static IAsyncValueChangedEventHandler<float> GetAsyncValueChangedEventHandler(this Scrollbar scrollbar)
Parameters
scrollbar
Scrollbar
public static IAsyncValueChangedEventHandler<float> GetAsyncValueChangedEventHandler(this Scrollbar scrollbar, CancellationToken cancellationToken)
Parameters
scrollbar
Scrollbar
cancellationToken
System.Threading.CancellationToken
public static IAsyncValueChangedEventHandler<Vector2> GetAsyncValueChangedEventHandler(this ScrollRect scrollRect)
Parameters
scrollRect
ScrollRect
public static IAsyncValueChangedEventHandler<Vector2> GetAsyncValueChangedEventHandler(this ScrollRect scrollRect, CancellationToken cancellationToken)
Parameters
scrollRect
ScrollRect
cancellationToken
System.Threading.CancellationToken
GetAsyncValueChangedEventHandler(Slider)
public static IAsyncValueChangedEventHandler<float> GetAsyncValueChangedEventHandler(this Slider slider)
GetAsyncValueChangedEventHandler(Slider, CancellationToken)
public static IAsyncValueChangedEventHandler<float> GetAsyncValueChangedEventHandler(this Slider slider, CancellationToken cancellationToken)
Parameters
slider
Slider
cancellationToken
System.Threading.CancellationToken
GetAsyncValueChangedEventHandler(Toggle)
public static IAsyncValueChangedEventHandler<bool> GetAsyncValueChangedEventHandler(this Toggle toggle)
GetAsyncValueChangedEventHandler(Toggle, CancellationToken)
public static IAsyncValueChangedEventHandler<bool> GetAsyncValueChangedEventHandler(this Toggle toggle, CancellationToken cancellationToken)
Parameters
toggle
Toggle
cancellationToken
System.Threading.CancellationToken
GetAwaiter(AsyncGPUReadbackRequest)
public static UniTask<AsyncGPUReadbackRequest>.Awaiter GetAwaiter(this AsyncGPUReadbackRequest asyncOperation)
Parameters
asyncOperation
AsyncGPUReadbackRequest
GetAwaiter(AsyncOperation)
public static UnityAsyncExtensions.AsyncOperationAwaiter GetAwaiter(this AsyncOperation asyncOperation)
Parameters
asyncOperation
AsyncOperation
GetAwaiter(ResourceRequest)
public static UnityAsyncExtensions.ResourceRequestAwaiter GetAwaiter(this ResourceRequest asyncOperation)
Parameters
asyncOperation
ResourceRequest
public static IUniTaskAsyncEnumerable<AsyncUnit> OnClickAsAsyncEnumerable(this Button button)
public static IUniTaskAsyncEnumerable<AsyncUnit> OnClickAsAsyncEnumerable(this Button button, CancellationToken cancellationToken)
Parameters
button
Button
cancellationToken
System.Threading.CancellationToken
public static UniTask OnClickAsync(this Button button)
public static UniTask OnClickAsync(this Button button, CancellationToken cancellationToken)
Parameters
button
Button
cancellationToken
System.Threading.CancellationToken
public static IUniTaskAsyncEnumerable<string> OnEndEditAsAsyncEnumerable(this InputField inputField)
Parameters
inputField
InputField
public static IUniTaskAsyncEnumerable<string> OnEndEditAsAsyncEnumerable(this InputField inputField, CancellationToken cancellationToken)
Parameters
inputField
InputField
cancellationToken
System.Threading.CancellationToken
public static UniTask<string> OnEndEditAsync(this InputField inputField)
Parameters
inputField
InputField
public static UniTask<string> OnEndEditAsync(this InputField inputField, CancellationToken cancellationToken)
Parameters
inputField
InputField
cancellationToken
System.Threading.CancellationToken
OnInvokeAsAsyncEnumerable(UnityEvent, CancellationToken)
public static IUniTaskAsyncEnumerable<AsyncUnit> OnInvokeAsAsyncEnumerable(this UnityEvent unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent
cancellationToken
System.Threading.CancellationToken
OnInvokeAsAsyncEnumerable<T>(UnityEvent<T>, CancellationToken)
public static IUniTaskAsyncEnumerable<T> OnInvokeAsAsyncEnumerable<T>(this UnityEvent<T> unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent<T>
cancellationToken
System.Threading.CancellationToken
OnInvokeAsync(UnityEvent, CancellationToken)
public static UniTask OnInvokeAsync(this UnityEvent unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent
cancellationToken
System.Threading.CancellationToken
OnInvokeAsync<T>(UnityEvent<T>, CancellationToken)
public static UniTask<T> OnInvokeAsync<T>(this UnityEvent<T> unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent<T>
cancellationToken
System.Threading.CancellationToken
OnValueChangedAsAsyncEnumerable(Dropdown)
public static IUniTaskAsyncEnumerable<int> OnValueChangedAsAsyncEnumerable(this Dropdown dropdown)
Parameters
dropdown
Dropdown
OnValueChangedAsAsyncEnumerable(Dropdown, CancellationToken)
public static IUniTaskAsyncEnumerable<int> OnValueChangedAsAsyncEnumerable(this Dropdown dropdown, CancellationToken cancellationToken)
Parameters
dropdown
Dropdown
cancellationToken
System.Threading.CancellationToken
public static IUniTaskAsyncEnumerable<string> OnValueChangedAsAsyncEnumerable(this InputField inputField)
Parameters
inputField
InputField
public static IUniTaskAsyncEnumerable<string> OnValueChangedAsAsyncEnumerable(this InputField inputField, CancellationToken cancellationToken)
Parameters
inputField
InputField
cancellationToken
System.Threading.CancellationToken
public static IUniTaskAsyncEnumerable<float> OnValueChangedAsAsyncEnumerable(this Scrollbar scrollbar)
Parameters
scrollbar
Scrollbar
public static IUniTaskAsyncEnumerable<float> OnValueChangedAsAsyncEnumerable(this Scrollbar scrollbar, CancellationToken cancellationToken)
Parameters
scrollbar
Scrollbar
cancellationToken
System.Threading.CancellationToken
public static IUniTaskAsyncEnumerable<Vector2> OnValueChangedAsAsyncEnumerable(this ScrollRect scrollRect)
Parameters
scrollRect
ScrollRect
public static IUniTaskAsyncEnumerable<Vector2> OnValueChangedAsAsyncEnumerable(this ScrollRect scrollRect, CancellationToken cancellationToken)
Parameters
scrollRect
ScrollRect
cancellationToken
System.Threading.CancellationToken
OnValueChangedAsAsyncEnumerable(Slider)
public static IUniTaskAsyncEnumerable<float> OnValueChangedAsAsyncEnumerable(this Slider slider)
OnValueChangedAsAsyncEnumerable(Slider, CancellationToken)
public static IUniTaskAsyncEnumerable<float> OnValueChangedAsAsyncEnumerable(this Slider slider, CancellationToken cancellationToken)
Parameters
slider
Slider
cancellationToken
System.Threading.CancellationToken
OnValueChangedAsAsyncEnumerable(Toggle)
public static IUniTaskAsyncEnumerable<bool> OnValueChangedAsAsyncEnumerable(this Toggle toggle)
OnValueChangedAsAsyncEnumerable(Toggle, CancellationToken)
public static IUniTaskAsyncEnumerable<bool> OnValueChangedAsAsyncEnumerable(this Toggle toggle, CancellationToken cancellationToken)
Parameters
toggle
Toggle
cancellationToken
System.Threading.CancellationToken
OnValueChangedAsync(Dropdown)
public static UniTask<int> OnValueChangedAsync(this Dropdown dropdown)
Parameters
dropdown
Dropdown
OnValueChangedAsync(Dropdown, CancellationToken)
public static UniTask<int> OnValueChangedAsync(this Dropdown dropdown, CancellationToken cancellationToken)
Parameters
dropdown
Dropdown
cancellationToken
System.Threading.CancellationToken
public static UniTask<string> OnValueChangedAsync(this InputField inputField)
Parameters
inputField
InputField
public static UniTask<string> OnValueChangedAsync(this InputField inputField, CancellationToken cancellationToken)
Parameters
inputField
InputField
cancellationToken
System.Threading.CancellationToken
public static UniTask<float> OnValueChangedAsync(this Scrollbar scrollbar)
Parameters
scrollbar
Scrollbar
public static UniTask<float> OnValueChangedAsync(this Scrollbar scrollbar, CancellationToken cancellationToken)
Parameters
scrollbar
Scrollbar
cancellationToken
System.Threading.CancellationToken
public static UniTask<Vector2> OnValueChangedAsync(this ScrollRect scrollRect)
Parameters
scrollRect
ScrollRect
public static UniTask<Vector2> OnValueChangedAsync(this ScrollRect scrollRect, CancellationToken cancellationToken)
Parameters
scrollRect
ScrollRect
cancellationToken
System.Threading.CancellationToken
OnValueChangedAsync(Slider)
public static UniTask<float> OnValueChangedAsync(this Slider slider)
OnValueChangedAsync(Slider, CancellationToken)
public static UniTask<float> OnValueChangedAsync(this Slider slider, CancellationToken cancellationToken)
Parameters
slider
Slider
cancellationToken
System.Threading.CancellationToken
OnValueChangedAsync(Toggle)
public static UniTask<bool> OnValueChangedAsync(this Toggle toggle)
OnValueChangedAsync(Toggle, CancellationToken)
public static UniTask<bool> OnValueChangedAsync(this Toggle toggle, CancellationToken cancellationToken)
Parameters
toggle
Toggle
cancellationToken
System.Threading.CancellationToken
StartAsyncCoroutine(UnityEngine.MonoBehaviour, Func<CancellationToken, UniTask>)
public static UniTask StartAsyncCoroutine(this UnityEngine.MonoBehaviour monoBehaviour, Func<CancellationToken, UniTask> asyncCoroutine)
Parameters
monoBehaviour
UnityEngine.MonoBehaviour
asyncCoroutine
System.Func<System.Threading.CancellationToken, UniTask>
ToUniTask(AsyncGPUReadbackRequest, PlayerLoopTiming, CancellationToken, Boolean)
public static UniTask<AsyncGPUReadbackRequest> ToUniTask(this AsyncGPUReadbackRequest asyncOperation, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false)
Parameters
asyncOperation
AsyncGPUReadbackRequest
timing
PlayerLoopTiming
cancellationToken
System.Threading.CancellationToken
cancelImmediately
System.Boolean
Returns
- UniTask<AsyncGPUReadbackRequest>
ToUniTask(AsyncOperation, IProgress<Single>, PlayerLoopTiming, CancellationToken, Boolean)
public static UniTask ToUniTask(this AsyncOperation asyncOperation, IProgress<float> progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false)
Parameters
asyncOperation
AsyncOperation
progress
System.IProgress<System.Single>
timing
PlayerLoopTiming
cancellationToken
System.Threading.CancellationToken
cancelImmediately
System.Boolean
ToUniTask(ResourceRequest, IProgress<Single>, PlayerLoopTiming, CancellationToken, Boolean)
public static UniTask<UnityEngine.Object> ToUniTask(this ResourceRequest asyncOperation, IProgress<float> progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false)
Parameters
asyncOperation
ResourceRequest
progress
System.IProgress<System.Single>
timing
PlayerLoopTiming
cancellationToken
System.Threading.CancellationToken
cancelImmediately
System.Boolean
Returns
- UniTask<UnityEngine.Object>
WithCancellation(AsyncGPUReadbackRequest, CancellationToken)
public static UniTask<AsyncGPUReadbackRequest> WithCancellation(this AsyncGPUReadbackRequest asyncOperation, CancellationToken cancellationToken)
Parameters
asyncOperation
AsyncGPUReadbackRequest
cancellationToken
System.Threading.CancellationToken
Returns
- UniTask<AsyncGPUReadbackRequest>
WithCancellation(AsyncGPUReadbackRequest, CancellationToken, Boolean)
public static UniTask<AsyncGPUReadbackRequest> WithCancellation(this AsyncGPUReadbackRequest asyncOperation, CancellationToken cancellationToken, bool cancelImmediately)
Parameters
asyncOperation
AsyncGPUReadbackRequest
cancellationToken
System.Threading.CancellationToken
cancelImmediately
System.Boolean
Returns
- UniTask<AsyncGPUReadbackRequest>
WithCancellation(AsyncOperation, CancellationToken)
public static UniTask WithCancellation(this AsyncOperation asyncOperation, CancellationToken cancellationToken)
Parameters
asyncOperation
AsyncOperation
cancellationToken
System.Threading.CancellationToken
WithCancellation(AsyncOperation, CancellationToken, Boolean)
public static UniTask WithCancellation(this AsyncOperation asyncOperation, CancellationToken cancellationToken, bool cancelImmediately)
Parameters
asyncOperation
AsyncOperation
cancellationToken
System.Threading.CancellationToken
cancelImmediately
System.Boolean
WithCancellation(ResourceRequest, CancellationToken)
public static UniTask<UnityEngine.Object> WithCancellation(this ResourceRequest asyncOperation, CancellationToken cancellationToken)
Parameters
asyncOperation
ResourceRequest
cancellationToken
System.Threading.CancellationToken
Returns
- UniTask<UnityEngine.Object>
WithCancellation(ResourceRequest, CancellationToken, Boolean)
public static UniTask<UnityEngine.Object> WithCancellation(this ResourceRequest asyncOperation, CancellationToken cancellationToken, bool cancelImmediately)
Parameters
asyncOperation
ResourceRequest
cancellationToken
System.Threading.CancellationToken
cancelImmediately
System.Boolean
Returns
- UniTask<UnityEngine.Object>