Navigation
API > API/Runtime > API/Runtime/AIModule
Data required for instance of single subtree
| Name | FBehaviorTreeInstance |
| Type | struct |
| Header File | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BehaviorTreeTypes.h |
| Include Path | #include "BehaviorTree/BehaviorTreeTypes.h" |
Syntax
struct FBehaviorTreeInstance
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| BehaviorTree/BehaviorTreeTypes.h | |||
FBehaviorTreeInstance
(
const FBehaviorTreeInstance& Other |
BehaviorTree/BehaviorTreeTypes.h | ||
FBehaviorTreeInstance
(
FBehaviorTreeInstance&& Other |
BehaviorTree/BehaviorTreeTypes.h | ||
FBehaviorTreeInstance
(
int32 MemorySize |
BehaviorTree/BehaviorTreeTypes.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FBehaviorTreeInstance() |
BehaviorTree/BehaviorTreeTypes.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveAuxNodes | TArray< TObjectPtr< UBTAuxiliaryNode > > | Active auxiliary nodes | BehaviorTree/BehaviorTreeTypes.h | |
| ActiveNode | TObjectPtr< UBTNode > | Active node in template | BehaviorTree/BehaviorTreeTypes.h | |
| ActiveNodeType | TEnumAsByte< EBTActiveNode::Type > | Active node type | BehaviorTree/BehaviorTreeTypes.h | |
| DeactivationNotify | FBTInstanceDeactivation | Delegate sending a notify when tree instance is removed from active stack | BehaviorTree/BehaviorTreeTypes.h | |
| InstanceIdIndex | uint8 | Index of identifier (BehaviorTreeComponent.KnownInstances) | BehaviorTree/BehaviorTreeTypes.h | |
| InstanceMemory | TArray< uint8 > | Memory: instance | BehaviorTree/BehaviorTreeTypes.h | |
| ParallelTasks | TArray< FBehaviorTreeParallelTask > | Active parallel tasks | BehaviorTree/BehaviorTreeTypes.h | |
| RootNode | TObjectPtr< UBTCompositeNode > | Root node in template | BehaviorTree/BehaviorTreeTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddToActiveAuxNodes
(
UBehaviorTreeComponent& OwnerComp, |
Add specified node to the active nodes list | BehaviorTree/BehaviorTreeTypes.h | |
void AddToActiveAuxNodes
(
UBTAuxiliaryNode* AuxNode |
BehaviorTree/BehaviorTreeTypes.h | ||
void AddToParallelTasks
(
FBehaviorTreeParallelTask&& ParallelTask |
Add new parallel task | BehaviorTree/BehaviorTreeTypes.h | |
void Cleanup
(
UBehaviorTreeComponent& OwnerComp, |
Cleanup node instances | BehaviorTree/BehaviorTreeTypes.h | |
void DeactivateNodes
(
FBehaviorTreeSearchData& SearchData, |
Deactivate all active aux nodes and remove their requests from SearchData | BehaviorTree/BehaviorTreeTypes.h | |
void DecMemoryStats() |
BehaviorTree/BehaviorTreeTypes.h | ||
void ExecuteOnEachAuxNode
(
TFunctionRef< void(const UBTAuxiliaryNode&)> ExecFunc |
Iterate on auxiliary nodes and call ExecFunc on each of them. | BehaviorTree/BehaviorTreeTypes.h | |
void ExecuteOnEachParallelTask
(
TFunctionRef< void(const FBehaviorTreeParallelTask&, const int32)> ExecFunc |
Iterate on parallel tasks and call ExecFunc on each of them. | BehaviorTree/BehaviorTreeTypes.h | |
TArrayView< UBTAuxiliaryNode *const > GetActiveAuxNodes() |
Get list of all active auxiliary nodes | BehaviorTree/BehaviorTreeTypes.h | |
uint32 GetAllocatedSize() |
BehaviorTree/BehaviorTreeTypes.h | ||
TArrayView< const uint8 > GetInstanceMemory() |
Get instance memory | BehaviorTree/BehaviorTreeTypes.h | |
TArrayView< const FBehaviorTreeParallelTask > GetParallelTasks() |
Get list of all active parallel tasks | BehaviorTree/BehaviorTreeTypes.h | |
bool HasActiveNode
(
uint16 TestExecutionIndex |
Check if instance has active node with given execution index | BehaviorTree/BehaviorTreeTypes.h | |
void IncMemoryStats() |
BehaviorTree/BehaviorTreeTypes.h | ||
void Initialize
(
UBehaviorTreeComponent& OwnerComp, |
Initialize memory and create node instances | BehaviorTree/BehaviorTreeTypes.h | |
bool IsValidParallelTaskIndex
(
const int32 Index |
Indicates if the provided index is a valid parallel task index | BehaviorTree/BehaviorTreeTypes.h | |
void MarkParallelTaskAsAbortingAt
(
int32 TaskIndex |
Mark parallel task at given index as pending abort | BehaviorTree/BehaviorTreeTypes.h | |
void RemoveFromActiveAuxNodes
(
UBTAuxiliaryNode* AuxNode |
BehaviorTree/BehaviorTreeTypes.h | ||
void RemoveFromActiveAuxNodes
(
UBehaviorTreeComponent& OwnerComp, |
Remove specified node from the active nodes list | BehaviorTree/BehaviorTreeTypes.h | |
void RemoveParallelTaskAt
(
int32 TaskIndex |
Remove parallel task at given index | BehaviorTree/BehaviorTreeTypes.h | |
void ResetActiveAuxNodes() |
Remove all auxiliary nodes from active nodes list | BehaviorTree/BehaviorTreeTypes.h | |
void SetInstanceMemory
(
const TArray< uint8 >& Memory |
Set instance memory | BehaviorTree/BehaviorTreeTypes.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CleanupNodes
(
UBehaviorTreeComponent& OwnerComp, |
Worker for updating all nodes | BehaviorTree/BehaviorTreeTypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FBehaviorTreeInstance & operator=
(
const FBehaviorTreeInstance& Other |
BehaviorTree/BehaviorTreeTypes.h | ||
FBehaviorTreeInstance & operator=
(
FBehaviorTreeInstance&& Other |
BehaviorTree/BehaviorTreeTypes.h |