UBTCompositeNode

Windows
MacOS
Linux

Inheritance Hierarchy

Syntax

class UBTCompositeNode : public UBTNode

Variables

Name Description

Protected variable

uint32: 1

 

bApplyDecoratorScope

If set, all decorators in branch below will be removed when execution flow leaves (decorators on this node are not affected)

Protected variable

uint32: 1

 

bUseChildExecutionNotify

If set, NotifyChildExecution will be called

Protected variable

uint32: 1

 

bUseDecoratorsActivationCheck

If set, CanNotifyDecoratorsOnActivation will be called

Protected variable

uint32: 1

 

bUseDecoratorsDeactivationCheck

If set, CanNotifyDecoratorsOnDeactivation will be called

Protected variable

uint32: 1

 

bUseDecoratorsFailedActivationCheck

If set, CanNotifyDecoratorsOnFailedActivation will be called

Protected variable

uint32: 1

 

bUseNodeActivationNotify

If set, NotifyNodeActivation will be called

Protected variable

uint32: 1

 

bUseNodeDeactivationNotify

If set, NotifyNodeDeactivation will be called

Public variable

TArray< FBTComp...

 

Children

Child nodes

Protected variable

uint16

 

LastExecutionIndex

Execution index of last node in child branches

Public variable

TArray< UBTServ...

 

Services

Service nodes

Constructors

Name Description

Public function

UBTCompositeNode

(
    const FObjectInitializer& ObjectIn...
)

Destructors

Name Description

Public function

~UBTCompositeNode()

Functions

Name Description

Public function Virtual Const

bool

 

CanAbortLowerPriority()

Public function Virtual Const

bool

 

CanAbortSelf()

Protected function Virtual Const

bool

 

CanNotifyDecoratorsOnActivation

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 ChildIdx
)

Check if NotifyDecoratorsOnActivation is allowed, requires bUseDecoratorsActivationCheck flag

Protected function Virtual Const

bool

 

CanNotifyDecoratorsOnDeactivation

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 ChildIdx,
    EBTNodeResult::Type& NodeResult
)

Check if NotifyDecoratorsOnDeactivation is allowed, requires bUseDecoratorsDeactivationCheck flag

Protected function Virtual Const

bool

 

CanNotifyDecoratorsOnFailedActivation

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 ChildIdx,
    EBTNodeResult::Type& NodeResult
)

Check if NotifyDecoratorsOnFailedActivation is allowed, requires bUseDecoratorsActivationCheck flag

Public function Virtual Const

bool

 

CanPushSubtree

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    int32 ChildIdx
)

Check if child node can execute new subtree

Public function Const

void

 

ConditionalNotifyChildExecution

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    const UBTNode& ChildNode,
    EBTNodeResult::Type& NodeResult
)

Notify about task execution start

Public function Const

bool

 

DoDecoratorsAllowExecution

(
    UBehaviorTreeComponent& OwnerComp,
    int32 InstanceIdx,
    int32 ChildIdx
)

Is child execution allowed by decorators?

Public function Const

int32

 

FindChildToExecute

(
    FBehaviorTreeSearchData& SearchDat...,
    EBTNodeResult::Type& LastResult
)

Find next child branch to execute

Public function Const

uint16

 

GetBranchExecutionIndex

(
    uint16 NodeInBranchIdx
)

Get first execution index of given branch

Public function Const

uint16

 

GetChildExecutionIndex

(
    int32 Index,
    EBTChildIndex ChildMode
)

Public function Const

int32

 

GetChildIndex

(
    FBehaviorTreeSearchData& SearchDat...,
    const UBTNode& ChildNode
)

Get index of child node (handle subtrees)

Public function Const

int32

 

GetChildIndex

(
    const UBTNode& ChildNode
)

Get index of child node

Public function Const

UBTNode *...

 

GetChildNode

(
    int32 Index
)

Public function Const

int32

 

GetChildrenNum()

Public function Const

uint16

 

GetLastExecutionIndex()

Public function Const

int32

 

GetMatchingChildIndex

(
    int32 ActiveInstanceIdx,
    FBTNodeIndex& NodeIdx
)

Find branch containing specified node index

Protected function Const

int32

 

GetNextChild

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 LastChildIdx,
    EBTNodeResult::Type LastResult
)

Get next child to process and store it in CurrentChild

Protected function Virtual Const

int32

 

GetNextChildHandler

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 PrevChild,
    EBTNodeResult::Type LastResult
)

Public function

void

 

InitializeComposite

(
    uint16 InLastExecutionIndex
)

Fill in data about tree structure

Public function Const

bool

 

IsApplyingDecoratorScope()

Protected function Virtual Const

void

 

NotifyChildExecution

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    int32 ChildIdx,
    EBTNodeResult::Type& NodeResult
)

Called just after child execution, allows to modify result

Protected function Const

void

 

NotifyDecoratorsOnActivation

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 ChildIdx
)

Runs through decorators on given child node and notify them about activation

Protected function Const

void

 

NotifyDecoratorsOnDeactivation

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 ChildIdx,
    EBTNodeResult::Type& NodeResult
)

Runs through decorators on given child node and notify them about deactivation

Protected function Const

void

 

NotifyDecoratorsOnFailedActivation

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 ChildIdx,
    EBTNodeResult::Type& NodeResult
)

Runs through decorators on given child node and notify them about failed activation

Protected function Virtual Const

void

 

NotifyNodeActivation

(
    FBehaviorTreeSearchData& SearchDat...
)

Called when start enters this node

Protected function Virtual Const

void

 

NotifyNodeDeactivation

(
    FBehaviorTreeSearchData& SearchDat...,
    EBTNodeResult::Type& NodeResult
)

Called when start leaves this node

Public function Const

void

 

OnChildActivation

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 ChildIndex
)

Called before passing search to child node

Public function Const

void

 

OnChildActivation

(
    FBehaviorTreeSearchData& SearchDat...,
    const UBTNode& ChildNode
)

Called before passing search to child node

Public function Const

void

 

OnChildDeactivation

(
    FBehaviorTreeSearchData& SearchDat...,
    const UBTNode& ChildNode,
    EBTNodeResult::Type& NodeResult
)

Called after child has finished search

Public function Const

void

 

OnChildDeactivation

(
    FBehaviorTreeSearchData& SearchDat...,
    int32 ChildIndex,
    EBTNodeResult::Type& NodeResult
)

Called after child has finished search

Public function Const

void

 

OnNodeActivation

(
    FBehaviorTreeSearchData& SearchDat...
)

Called when start enters this node

Public function Const

void

 

OnNodeDeactivation

(
    FBehaviorTreeSearchData& SearchDat...,
    EBTNodeResult::Type& NodeResult
)

Called when search leaves this node

Public function Const

void

 

OnNodeRestart

(
    FBehaviorTreeSearchData& SearchDat...
)

Called when search needs to reactivate this node

Protected function Const

void

 

RequestDelayedExecution

(
    UBehaviorTreeComponent& OwnerComp,
    EBTNodeResult::Type LastResult
)

Store delayed execution request

Public function Virtual Const

void

 

SetChildOverride

(
    FBehaviorTreeSearchData& SearchDat...,
    int8 Index
)

Set override for next child index

Overridden from UBTNode

Name Description

Public function Virtual Const

void

 

DescribeRuntimeValues

(
    const UBehaviorTreeComponent& Owne...,
    uint8* NodeMemory,
    EBTDescriptionVerbosity::Type Verbo...,
    TArray< FString >& Values
)

Gathers description of all runtime parameters

Public function Virtual Const

uint16

 

GetInstanceMemorySize()

Size of instance memory

Deprecated Variables

Name Description

Public variable

FGetNextChildDe...

 

OnNextChild

OnNextChild is no longer being used. Please override UBTCompositeNode::GetNextChildHandler instead

References

Module

AIModule

Header

Runtime/AIModule/Classes/BehaviorTree/BTCompositeNode.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback