Navigation
Unreal Engine C++ API Reference > Runtime > AIModule > BehaviorTree
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UBTNode
- UBTAuxiliaryNode
- UBTDecorator
- UBTDecorator_BlackboardBase
- UBTDecorator_Blackboard
- UBTDecorator_ConditionalLoop
- UTestBTDecorator_Blackboard
- UBTDecorator_IsAtLocation
- UBTDecorator_IsBBEntryOfClass
- UBTDecorator_BlueprintBase
- UTestBTDecorator_Blueprint
- UBTDecorator_CheckGameplayTagsOnActor
- UBTDecorator_CompareBBEntries
- UBTDecorator_ConeCheck
- UBTDecorator_Cooldown
- UBTDecorator_DoesPathExist
- UBTDecorator_ForceSuccess
- UBTDecorator_GameplayTagQuery
- UBTDecorator_KeepInCone
- UBTDecorator_Loop
- UBTDecorator_ReachedMoveGoal
- UBTDecorator_SetTagCooldown
- UBTDecorator_TagCooldown
- UBTDecorator_TimeLimit
- UTestBTDecorator_CantExecute
- UTestBTDecorator_DelayedAbort
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:
- OnNodeActivation
- OnNodeDeactivation
- OnNodeProcessed
- OnBecomeRelevant (from UBTAuxiliaryNode)
- OnCeaseRelevant (from UBTAuxiliaryNode)
- TickNode (from UBTAuxiliaryNode)
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
Type | Name | Description | |
---|---|---|---|
![]() |
uint32: 1 | bAllowAbortChildNodes | If set, FlowAbortMode can be set to Self and Both |
![]() |
uint32: 1 | bAllowAbortLowerPri | If set, FlowAbortMode can be set to LowerPriority and Both |
![]() |
uint32: 1 | bAllowAbortNone | If set, FlowAbortMode can be set to None |
![]() |
uint32: 1 | bNotifyActivation | If set, OnNodeActivation will be used |
![]() |
uint32: 1 | bNotifyDeactivation | If set, OnNodeDeactivation will be used |
![]() |
uint32: 1 | bNotifyProcessed | If set, OnNodeProcessed will be used |
![]() |
uint32: 1 | bShowInverseConditionDesc | If set, static description will include default description of inversed condition |
![]() |
friend | FBehaviorDecoratorDetails | |
![]() |
TEnumAsByte< EBTFlowAbortMode::Type > | FlowAbortMode | Flow controller settings |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UBTDecorator
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | CalculateRawConditionValue
(
UBehaviorTreeComponent& OwnerComp, |
Calculates raw, core value of decorator's condition. Should not include calling IsInversed |
![]() ![]() |
void | ConditionalFlowAbort
(
UBehaviorTreeComponent& OwnerComp, |
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 |
![]() ![]() |
EBTFlowAbortMode::Type | ||
![]() |
void | ||
![]() ![]() |
bool | ||
![]() ![]() |
bool | IsInversed () |
|
![]() ![]() |
void | OnNodeActivation
(
FBehaviorTreeSearchData& SearchData |
Called when underlying node is activated this function should be considered as const (don't modify state of object) if node is not instanced! bNotifyActivation must be set to true for this function to be called Calling INIT_DECORATOR_NODE_NOTIFY_FLAGS in the constructor of the decorator will set this flag automatically |
![]() ![]() |
void | OnNodeDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Called when underlying node has finished this function should be considered as const (don't modify state of object) if node is not instanced! bNotifyDeactivation must be set to true for this function to be called Calling INIT_DECORATOR_NODE_NOTIFY_FLAGS in the constructor of the decorator will set this flag automatically |
![]() ![]() |
void | OnNodeProcessed
(
FBehaviorTreeSearchData& SearchData, |
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! bNotifyProcessed must be set to true for this function to be called Calling INIT_DECORATOR_NODE_NOTIFY_FLAGS in the constructor of the decorator will set this flag automatically |
![]() |
void | SetIsInversed
(
bool bShouldBeInversed |
|
![]() |
void | Modify current flow abort mode, so it can be used with parent composite | |
![]() ![]() |
bool | WrappedCanExecute
(
UBehaviorTreeComponent& OwnerComp, |
Wrapper for node instancing: CalculateRawConditionValue |
![]() ![]() |
void | WrappedOnNodeActivation
(
FBehaviorTreeSearchData& SearchData |
Wrapper for node instancing: OnNodeActivation |
![]() ![]() |
void | WrappedOnNodeDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Wrapper for node instancing: OnNodeDeactivation |
![]() ![]() |
void | WrappedOnNodeProcessed
(
FBehaviorTreeSearchData& SearchData, |
Wrapper for node instancing: OnNodeProcessed |
Overridden from UBTNode
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
FString |