Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ GetValueAsync()

async Task< T > Sisus.Init.Any< T >.GetValueAsync ( Component client = null,
Context context = Context::MainThread )

Gets the value of the current Any<T> object if it has one.

If the underlying value is null and T is a global service or a scene service which is accessible to the client then gets the service.

Template Parameters
TClientType of the client requesting the value.
Parameters
clientThe client requesting the value.
contextThe context from which the request is being made.
Returns
The value associated with the current Any<T> object, if it has a value; otherwise, the default value of T.