ButtonExt.WaitForClickAsync Method
Asynchronously waits until a Button is clicked.
Namespace: UltimateXR.Extensions.Unity.UI
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static Task WaitForClickAsync(
this Button self,
CancellationToken ct = default
)
Parameters
- self
- Type: Button
Button to wait for - ct (Optional)
- Type: System.Threading.CancellationToken
Optional cancellation token, to cancel the task
Return Value
Type: Task
Awaitable task that will finish once the button was clicked or the Task was canceled
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Button. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).