ButtonExt.ReadAsync Method (Button, CancellationToken)
Asynchronously waits until a Button 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 self,
CancellationToken ct
)
Parameters
- self
- Type: Button
Button 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 the 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 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).
See Also
Reference
ButtonExt Class
ReadAsync Overload
UltimateXR.Extensions.Unity.UI Namespace