FBehaviorTreeInstance

Data required for instance of single subtree

Windows
MacOS
Linux

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BehaviorTreeTypes.h

Include

#include "BehaviorTree/BehaviorTreeTypes.h"

Syntax

struct FBehaviorTreeInstance

Remarks

Data required for instance of single subtree

Variables

Name Description

Public variable

TArray< UBTAuxi...

 

ActiveAuxNodes

Active auxiliary nodes

Public variable

UBTNode *

 

ActiveNode

Active node in template

Public variable

TEnumAsByte< EB...

 

ActiveNodeType

Active node type

Public variable

FBTInstanceDeac...

 

DeactivationNotify

Delegate sending a notify when tree instance is removed from active stack

Public variable

uint8

 

InstanceIdIndex

Index of identifier (BehaviorTreeComponent.KnownInstances)

Public variable

TArray< uint8 >

 

InstanceMemory

Memory: instance

Public variable

TArray< FBehavi...

 

ParallelTasks

Active parallel tasks

Public variable

UBTCompositeNod...

 

RootNode

Root node in template

Constructors

Name Description

Public function

FBehaviorTreeInstance()

Public function

FBehaviorTreeInstance

(
    const FBehaviorTreeInstance& Other
)

Public function

FBehaviorTreeInstance

(
    int32 MemorySize
)

Destructors

Name Description

Public function

~FBehaviorTreeInstance()

Functions

Name Description

Public function

void

 

AddToActiveAuxNodes

(
    UBTAuxiliaryNode* AuxNode
)

Add specified node to the active nodes list

Public function

void

 

AddToParallelTasks

(
    FBehaviorTreeParallelTask&& Parall...
)

Add new parallel task

Public function

void

 

Cleanup

(
    UBehaviorTreeComponent& OwnerComp,
    EBTMemoryClear::Type CleanupType
)

Cleanup node instances

Protected function

void

 

CleanupNodes

(
    UBehaviorTreeComponent& OwnerComp,
    UBTCompositeNode& Node,
    EBTMemoryClear::Type CleanupType
)

Worker for updating all nodes

Public function

void

 

DeactivateNodes

(
    FBehaviorTreeSearchData& SearchDat...,
    uint16 InstanceIndex
)

Deactivate all active aux nodes and remove their requests from SearchData

Public function Const

void

 

DecMemoryStats()

Public function

void

 

ExecuteOnEachAuxNode

(
    TFunctionRef< void...
)

Iterate on auxiliary nodes and call ExecFunc on each of them.

Public function

void

 

ExecuteOnEachParallelTask

(
    TFunctionRef< void...
)

Iterate on parallel tasks and call ExecFunc on each of them.

Public function Const

TArrayView< ...

 

GetActiveAuxNodes()

Get list of all active auxiliary nodes

Public function Const

uint32

 

GetAllocatedSize()

Public function Const

TArrayView< ...

 

GetInstanceMemory()

Get instance memory

Public function Const

TArrayView< ...

 

GetParallelTasks()

Get list of all active parallel tasks

Public function Const

bool

 

HasActiveNode

(
    uint16 TestExecutionIndex
)

Check if instance has active node with given execution index

Public function Const

void

 

IncMemoryStats()

Public function

void

 

Initialize

(
    UBehaviorTreeComponent& OwnerComp,
    UBTCompositeNode& Node,
    int32& InstancedIndex,
    EBTMemoryInit::Type InitType
)

Initialize memory and create node instances

Public function Const

bool

 

IsValidParallelTaskIndex

(
    const int32 Index
)

Indicates if the provided index is a valid parallel task index

Public function

void

 

MarkParallelTaskAsAbortingAt

(
    int32 TaskIndex
)

Mark parallel task at given index as pending abort

Public function

void

 

RemoveFromActiveAuxNodes

(
    UBTAuxiliaryNode* AuxNode
)

Remove specified node from the active nodes list

Public function

void

 

RemoveParallelTaskAt

(
    int32 TaskIndex
)

Remove parallel task at given index

Public function

void

 

ResetActiveAuxNodes()

Remove all auxiliary nodes from active nodes list

Public function

void

 

SetInstanceMemory

(
    const TArray< uint8 >& Memory
)

Set instance memory

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss