UBTDecorator

Decorators are supporting nodes placed on parent-child connection, that receive notification about execution flow and can be ticked

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

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

Include

#include "BehaviorTree/BTDecorator.h"

Syntax

class UBTDecorator : public UBTAuxiliaryNode

Remarks

Decorators are supporting nodes placed on parent-child connection, that receive notification about execution flow and can be ticked

Because some of them can be instanced for specific AI, following virtual functions are not marked as const:

If your node is not being instanced (default behavior), DO NOT change any properties of object within those functions! Template nodes are shared across all behavior tree components using the same tree asset and must store their runtime properties in provided NodeMemory block (allocation size determined by GetInstanceMemorySize() )

Variables

Name Description

Protected variable

uint32: 1

 

bAllowAbortChildNodes

If set, FlowAbortMode can be set to Self and Both

Protected variable

uint32: 1

 

bAllowAbortLowerPri

If set, FlowAbortMode can be set to LowerPriority and Both

Protected variable

uint32: 1

 

bAllowAbortNone

If set, FlowAbortMode can be set to None

Protected variable

uint32: 1

 

bNotifyActivation

If set, OnNodeActivation will be used

Protected variable

uint32: 1

 

bNotifyDeactivation

If set, OnNodeDeactivation will be used

Protected variable

uint32: 1

 

bNotifyProcessed

If set, OnNodeProcessed will be used

Protected variable

uint32: 1

 

bShowInverseConditionDesc

If set, static description will include default description of inversed condition

Protected variable

friend

 

FBehaviorDecoratorDetails

Protected variable

TEnumAsByte< EB...

 

FlowAbortMode

Flow controller settings

Constructors

Name Description

Public function

UBTDecorator

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function Virtual Const

bool

 

CalculateRawConditionValue

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory
)

Calculates raw, core value of decorator's condition. Should not include calling IsInversed

Protected function Const

void

 

ConditionalFlowAbort

(
    UBehaviorTreeComponent& OwnerComp,
    EBTDecoratorAbortRequest RequestMod...
)

More "flow aware" version of calling RequestExecution(this) on owning behavior tree component should be used in external events that may change result of CalculateRawConditionValue

Public function Const

EBTFlowAbort...

 

GetFlowAbortMode()

Public function Const

bool

 

IsFlowAbortModeValid()

Public function Const

bool

 

IsInversed()

Protected function Virtual

void

 

OnNodeActivation

(
    FBehaviorTreeSearchData& SearchDat...
)

Called when underlying node is activated this function should be considered as const (don't modify state of object) if node is not instanced!

Protected function Virtual

void

 

OnNodeDeactivation

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

Called when underlying node has finished this function should be considered as const (don't modify state of object) if node is not instanced!

Protected function Virtual

void

 

OnNodeProcessed

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

Called when underlying node was processed (deactivated or failed to activate) this function should be considered as const (don't modify state of object) if node is not instanced!

Protected function

void

 

SetIsInversed

(
    bool bShouldBeInversed
)

Public function

void

 

UpdateFlowAbortMode()

Modify current flow abort mode, so it can be used with parent composite

Public function Const

bool

 

WrappedCanExecute

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory
)

Wrapper for node instancing: CalculateRawConditionValue

Public function Const

void

 

WrappedOnNodeActivation

(
    FBehaviorTreeSearchData& SearchDat...
)

Wrapper for node instancing: OnNodeActivation

Public function Const

void

 

WrappedOnNodeDeactivation

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

Wrapper for node instancing: OnNodeDeactivation

Public function Const

void

 

WrappedOnNodeProcessed

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

Wrapper for node instancing: OnNodeProcessed

Overridden from UBTNode

Name Description

Public function Virtual Const

FString

 

GetStaticDescription()

Deprecated Functions

Name Description

Protected function

void

 

InitializeDecorator

(
    uint8 InChildIndex
)

This function is deprecated, please use InitializeParentLink instead.

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