Click or drag to resize
IAgentDataGetTaskDataT Method
Tries to cast the current task data to the specified type and returns it. Throws an exception if there is no current task data or if it couldn't be casted.

Namespace: Slash.AI.BehaviorTrees.Interfaces
Assembly: Slash.AI.BehaviorTrees (in Slash.AI.BehaviorTrees.dll) Version: 1.0.6018.40184
Syntax
T GetTaskData<T>()
where T : ITaskData

Type Parameters

T
Expected type of task data.

Return Value

Type: T
Current task data, casted to specified type.
Exceptions
ExceptionCondition
NullReferenceExceptionThrown if there is no current task data available.
InvalidCastExceptionThrown if the current task data couldn't be cast to the specified type.
See Also