Blocks the calling thread until the task has been ended and returns the return value of the task as the given type.
Use this method only for Tasks with return values (functions)!
Namespace: UnityThreadingAssembly: UnityThreading (in UnityThreading.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public abstract TResult WaitForSeconds<TResult>(
float seconds,
TResult defaultReturnValue
)
|
Visual Basic |
---|
Public MustOverride Function WaitForSeconds(Of TResult) ( _
seconds As Single, _
defaultReturnValue As TResult _
) As TResult |
Visual C++ |
---|
public:
generic<typename TResult>
virtual TResult WaitForSeconds(
float seconds,
TResult defaultReturnValue
) abstract |
Parameters
- seconds
- Type: System..::..Single
Time in seconds this method will max wait.
- defaultReturnValue
- Type: TResult
The default return value which will be returned when the task has failed.
Type Parameters
Return Value
The return value of the task as the given type.
See Also