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
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
CancellationToken
GetAsyncEventHandler(UnityEvent, CancellationToken)
public static AsyncUnityEventHandler GetAsyncEventHandler(this UnityEvent unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent
cancellationToken
CancellationToken
GetAsyncEventHandler<T>(UnityEvent<T>, CancellationToken)
public static AsyncUnityEventHandler<T> GetAsyncEventHandler<T>(this UnityEvent<T> unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent<T>
cancellationToken
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
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
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
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
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
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
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
CancellationToken
public static UniTask OnClickAsync(this Button button)
public static UniTask OnClickAsync(this Button button, CancellationToken cancellationToken)
Parameters
button
Button
cancellationToken
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
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
CancellationToken
OnInvokeAsAsyncEnumerable(UnityEvent, CancellationToken)
public static IUniTaskAsyncEnumerable<AsyncUnit> OnInvokeAsAsyncEnumerable(this UnityEvent unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent
cancellationToken
CancellationToken
OnInvokeAsAsyncEnumerable<T>(UnityEvent<T>, CancellationToken)
public static IUniTaskAsyncEnumerable<T> OnInvokeAsAsyncEnumerable<T>(this UnityEvent<T> unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent<T>
cancellationToken
CancellationToken
OnInvokeAsync(UnityEvent, CancellationToken)
public static UniTask OnInvokeAsync(this UnityEvent unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent
cancellationToken
CancellationToken
OnInvokeAsync<T>(UnityEvent<T>, CancellationToken)
public static UniTask<T> OnInvokeAsync<T>(this UnityEvent<T> unityEvent, CancellationToken cancellationToken)
Parameters
unityEvent
UnityEvent<T>
cancellationToken
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
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
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
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
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
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
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
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
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
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
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
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
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<CancellationToken, UniTask>
ToUniTask(AsyncGPUReadbackRequest, PlayerLoopTiming, CancellationToken, Boolean)
public static UniTask<AsyncGPUReadbackRequest> ToUniTask(this AsyncGPUReadbackRequest asyncOperation, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = null, bool cancelImmediately = false)
Parameters
asyncOperation
AsyncGPUReadbackRequest
timing
PlayerLoopTiming
cancellationToken
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 = null, bool cancelImmediately = false)
Parameters
asyncOperation
AsyncOperation
progress
System.IProgress<System.Single>
timing
PlayerLoopTiming
cancellationToken
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 = null, bool cancelImmediately = false)
Parameters
asyncOperation
ResourceRequest
progress
System.IProgress<System.Single>
timing
PlayerLoopTiming
cancellationToken
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
CancellationToken
Returns
- UniTask<AsyncGPUReadbackRequest>
WithCancellation(AsyncGPUReadbackRequest, CancellationToken, Boolean)
public static UniTask<AsyncGPUReadbackRequest> WithCancellation(this AsyncGPUReadbackRequest asyncOperation, CancellationToken cancellationToken, bool cancelImmediately)
Parameters
asyncOperation
AsyncGPUReadbackRequest
cancellationToken
CancellationToken
cancelImmediately
System.Boolean
Returns
- UniTask<AsyncGPUReadbackRequest>
WithCancellation(AsyncOperation, CancellationToken)
public static UniTask WithCancellation(this AsyncOperation asyncOperation, CancellationToken cancellationToken)
Parameters
asyncOperation
AsyncOperation
cancellationToken
CancellationToken
WithCancellation(AsyncOperation, CancellationToken, Boolean)
public static UniTask WithCancellation(this AsyncOperation asyncOperation, CancellationToken cancellationToken, bool cancelImmediately)
Parameters
asyncOperation
AsyncOperation
cancellationToken
CancellationToken
cancelImmediately
System.Boolean
WithCancellation(ResourceRequest, CancellationToken)
public static UniTask<UnityEngine.Object> WithCancellation(this ResourceRequest asyncOperation, CancellationToken cancellationToken)
Parameters
asyncOperation
ResourceRequest
cancellationToken
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
CancellationToken
cancelImmediately
System.Boolean
Returns
- UniTask<UnityEngine.Object>