NRSDKApiForUnity
Classes
XRXREALAsyncTask1G
Unity.XR.XREAL.AsyncTask< T >

Public Member Functions

 AsyncTask (out Action< T > asyncOperationComplete)
 
CustomYieldInstruction WaitForCompletion ()
 
AsyncTask< T > ThenAction (Action< T > doAfterTaskComplete)
 

Properties

bool IsComplete [get]
 
Result [get]
 

Detailed Description

A class used for monitoring the status of an asynchronous task.

Template Parameters
TThe resultant type of the task.

Member Function Documentation

◆ AsyncTask()

Unity.XR.XREAL.AsyncTask< T >.AsyncTask ( out Action< T > asyncOperationComplete)

Constructor for AsyncTask.

Parameters
asyncOperationComplete[out] A callback that, when invoked, changes the status of the task to complete and sets the result based on the argument supplied.

◆ ThenAction()

AsyncTask< T > Unity.XR.XREAL.AsyncTask< T >.ThenAction ( Action< T > doAfterTaskComplete)

Performs an action (callback) in the first Unity Update() call after task completion.

Parameters
doAfterTaskCompleteThe action to invoke when task is complete. The result of the task will be passed as an argument to the action.
Returns
The invoking asynchronous task.

◆ WaitForCompletion()

CustomYieldInstruction Unity.XR.XREAL.AsyncTask< T >.WaitForCompletion ( )

Returns a yield instruction that monitors this task for completion within a coroutine.

Returns
A yield instruction that monitors this task for completion.

Property Documentation

◆ IsComplete

bool Unity.XR.XREAL.AsyncTask< T >.IsComplete
get

Gets or sets a value indicating whether the task is complete.

true if the task is complete, otherwise false.

◆ Result

T Unity.XR.XREAL.AsyncTask< T >.Result
get

Gets or sets the result of a completed task.

The result of the completed task.