Navigation
API > API/Plugins > API/Plugins/StateTreeModule
Handle to access an external struct or object. This reference handle can be used in StateTree tasks and evaluators to have quick access to external data. The type provided to the template is used by the linker and context to pass along the type.
USTRUCT() struct FExampleTask : public FStateTreeTaskBase { ...
bool Link(FStateTreeLinker& Linker) { Linker.LinkExternalData(ExampleSubsystemHandle); return true; }
EStateTreeRunStatus EnterState(FStateTreeExecutionContext& Context, const EStateTreeStateChangeType ChangeType, const FStateTreeTransitionResult& Transition) { const UExampleSubsystem& ExampleSubsystem = Context.GetExternalData(ExampleSubsystemHandle); ... }
TStateTreeExternalDataHandle
| Name | TStateTreeExternalDataHandle |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/StateTreeExecutionTypes.h |
| Include Path | #include "StateTreeExecutionTypes.h" |
Syntax
template<typename T, EStateTreeExternalDataRequirement Req>
struct TStateTreeExternalDataHandle : public FStateTreeExternalDataHandle
Inheritance Hierarchy
- FStateTreeExternalDataHandle → TStateTreeExternalDataHandle
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DataType | T | StateTreeExecutionTypes.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DataRequirement | EStateTreeExternalDataRequirement | StateTreeExecutionTypes.h |