ButtonExt.ReadAsync Method (Button[], CancellationToken)
Asynchronously waits until a Button in a set is clicked. Returns the Button that was clicked.
Namespace: UltimateXR.Extensions.Unity.UI
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static Task<Button> ReadAsync(
this Button[] buttons,
CancellationToken ct
)
Parameters
- buttons
- Type: Button[]
Buttons to wait for - ct
- Type: System.Threading.CancellationToken
Optional cancellation token, to cancel the task
Return Value
Type: Task(Button)
Awaitable task that will finish once a button was clicked or the Task was canceled, and that returns the Button that was clicked
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . 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).
See Also
Reference
ButtonExt Class
ReadAsync Overload
UltimateXR.Extensions.Unity.UI Namespace