Navigation
API > API/Runtime > API/Runtime/AIModule
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() )
| Name | UBTDecorator |
| Type | class |
| Header File | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BTDecorator.h |
| Include Path | #include "BehaviorTree/BTDecorator.h" |
Syntax
UCLASS (Abstract, MinimalAPI)
class UBTDecorator : public UBTAuxiliaryNode
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBTNode → UBTAuxiliaryNode → UBTDecorator
Implements Interfaces
Derived Classes
UBTDecorator derived class hierarchy
- UBTDecorator_BlackboardBase
- UBTDecorator_BlueprintBase
- UBTDecorator_CheckGameplayTagsOnActor
- UBTDecorator_CompareBBEntries
- UBTDecorator_ConeCheck
- UBTDecorator_Cooldown
- UBTDecorator_DoesPathExist
- UBTDecorator_ForceSuccess
- UBTDecorator_GameplayTagQuery
- UBTDecorator_KeepInCone
- UBTDecorator_Loop
- UBTDecorator_LoopUntil
- UBTDecorator_ReachedMoveGoal
- UBTDecorator_SetTagCooldown
- UBTDecorator_TagCooldown
- UBTDecorator_TimeLimit
- UTestBTDecorator_CantExecute
- UTestBTDecorator_DelayedAbort
- UTestBTDecorator_NodeMemoryValidator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBTDecorator
(
const FObjectInitializer& ObjectInitializer |
BehaviorTree/BTDecorator.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bInverseCondition | uint32 | If set, condition check result will be inversed | BehaviorTree/BTDecorator.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
EBTFlowAbortMode::Type GetFlowAbortMode() |
BehaviorTree/BTDecorator.h | ||
bool IsFlowAbortModeValid() |
BehaviorTree/BTDecorator.h | ||
bool IsInversed() |
BehaviorTree/BTDecorator.h | ||
void UpdateFlowAbortMode() |
Modify current flow abort mode, so it can be used with parent composite | BehaviorTree/BTDecorator.h | |
bool WrappedCanExecute
(
UBehaviorTreeComponent& OwnerComp, |
Wrapper for node instancing: CalculateRawConditionValue | BehaviorTree/BTDecorator.h | |
void WrappedOnNodeActivation
(
FBehaviorTreeSearchData& SearchData |
Wrapper for node instancing: OnNodeActivation | BehaviorTree/BTDecorator.h | |
void WrappedOnNodeDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Wrapper for node instancing: OnNodeDeactivation | BehaviorTree/BTDecorator.h | |
void WrappedOnNodeProcessed
(
FBehaviorTreeSearchData& SearchData, |
Wrapper for node instancing: OnNodeProcessed | BehaviorTree/BTDecorator.h |
Overridden from UBTNode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FString GetStaticDescription() |
BehaviorTree/BTDecorator.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CalculateRawConditionValue
(
UBehaviorTreeComponent& OwnerComp, |
Calculates raw, core value of decorator's condition. Should not include calling IsInversed | BehaviorTree/BTDecorator.h | |
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 | BehaviorTree/BTDecorator.h | |
void InitNotifyFlags
(
TickNode, |
BehaviorTree/BTDecorator.h | ||
virtual 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 | BehaviorTree/BTDecorator.h | |
virtual 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 | BehaviorTree/BTDecorator.h | |
virtual 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 | BehaviorTree/BTDecorator.h | |
void SetIsInversed
(
bool bShouldBeInversed |
BehaviorTree/BTDecorator.h |