Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/BehaviorTree
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UBTNode
- UBTCompositeNode
- UBTComposite_Selector
- UBTComposite_Sequence
- UBTComposite_SimpleParallel
References
| Module | AIModule |
| Header | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BTCompositeNode.h |
| Include | #include "BehaviorTree/BTCompositeNode.h" |
Syntax
class UBTCompositeNode : public UBTNode
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint32: 1 | bApplyDecoratorScope | If set, all decorators in branch below will be removed when execution flow leaves (decorators on this node are not affected) | |
| uint32: 1 | bUseChildExecutionNotify | If set, NotifyChildExecution will be called | |
| uint32: 1 | bUseDecoratorsActivationCheck | If set, CanNotifyDecoratorsOnActivation will be called | |
| uint32: 1 | bUseDecoratorsDeactivationCheck | If set, CanNotifyDecoratorsOnDeactivation will be called | |
| uint32: 1 | bUseDecoratorsFailedActivationCheck | If set, CanNotifyDecoratorsOnFailedActivation will be called | |
| uint32: 1 | bUseNodeActivationNotify | If set, NotifyNodeActivation will be called | |
| uint32: 1 | bUseNodeDeactivationNotify | If set, NotifyNodeDeactivation will be called | |
| TArray< FBTCompositeChild > | Children | Child nodes | |
| uint16 | LastExecutionIndex | Execution index of last node in child branches | |
| TArray< TObjectPtr< UBTService > > | Services | Service nodes |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UBTCompositeNode
(
const FObjectInitializer& ObjectInitializer |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | |||
| bool | CanAbortSelf () |
||
| bool | CanNotifyDecoratorsOnActivation
(
FBehaviorTreeSearchData& SearchData, |
Check if NotifyDecoratorsOnActivation is allowed, requires bUseDecoratorsActivationCheck flag bUseDecoratorsActivationCheck must be set to true for this function to be called Calling INIT_COMPOSITE_NODE_NOTIFY_FLAGS in the constructor of the node will set this flag automatically | |
| bool | CanNotifyDecoratorsOnDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Check if NotifyDecoratorsOnDeactivation is allowed, requires bUseDecoratorsDeactivationCheck flag bUseDecoratorsDeactivationCheck must be set to true for this function to be called Calling INIT_COMPOSITE_NODE_NOTIFY_FLAGS in the constructor of the node will set this flag automatically | |
| bool | CanNotifyDecoratorsOnFailedActivation
(
FBehaviorTreeSearchData& SearchData, |
Check if NotifyDecoratorsOnFailedActivation is allowed, requires bUseDecoratorsActivationCheck flag bUseDecoratorsFailedActivationCheck must be set to true for this function to be called Calling INIT_COMPOSITE_NODE_NOTIFY_FLAGS in the constructor of the node will set this flag automatically | |
| bool | CanPushSubtree
(
UBehaviorTreeComponent& OwnerComp, |
Check if child node can execute new subtree | |
| void | ConditionalNotifyChildExecution
(
UBehaviorTreeComponent& OwnerComp, |
Notify about task execution start | |
| bool | DoDecoratorsAllowExecution
(
UBehaviorTreeComponent& OwnerComp, |
Is child execution allowed by decorators? | |
| int32 | FindChildToExecute
(
FBehaviorTreeSearchData& SearchData, |
Find next child branch to execute | |
| uint16 | GetBranchExecutionIndex
(
uint16 NodeInBranchIdx |
Get first execution index of given branch | |
| uint16 | GetChildExecutionIndex
(
int32 Index, |
||
| int32 | GetChildIndex
(
FBehaviorTreeSearchData& SearchData, |
Get index of child node (handle subtrees) | |
| int32 | GetChildIndex
(
const UBTNode& ChildNode |
Get index of child node | |
| UBTNode * | GetChildNode
(
int32 Index |
||
| int32 | |||
| uint16 | |||
| int32 | GetMatchingChildIndex
(
int32 ActiveInstanceIdx, |
Find branch containing specified node index | |
| int32 | GetNextChild
(
FBehaviorTreeSearchData& SearchData, |
Get next child to process and store it in CurrentChild | |
| int32 | GetNextChildHandler
(
FBehaviorTreeSearchData& SearchData, |
||
| void | InitializeComposite
(
uint16 InLastExecutionIndex |
Fill in data about tree structure | |
| void | |||
| bool | |||
| void | NotifyChildExecution
(
UBehaviorTreeComponent& OwnerComp, |
Called just after child execution, allows to modify result bUseChildExecutionNotify must be set to true for this function to be called Calling INIT_COMPOSITE_NODE_NOTIFY_FLAGS in the constructor of the node will set this flag automatically | |
| void | NotifyDecoratorsOnActivation
(
FBehaviorTreeSearchData& SearchData, |
Runs through decorators on given child node and notify them about activation | |
| void | NotifyDecoratorsOnDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Runs through decorators on given child node and notify them about deactivation | |
| void | NotifyDecoratorsOnFailedActivation
(
FBehaviorTreeSearchData& SearchData, |
Runs through decorators on given child node and notify them about failed activation | |
| void | NotifyNodeActivation
(
FBehaviorTreeSearchData& SearchData |
Called when start enters this node bUseNodeActivationNotify must be set to true for this function to be called Calling INIT_COMPOSITE_NODE_NOTIFY_FLAGS in the constructor of the node will set this flag automatically | |
| void | NotifyNodeDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Called when start leaves this node bUseNodeDeactivationNotify must be set to true for this function to be called Calling INIT_COMPOSITE_NODE_NOTIFY_FLAGS in the constructor of the node will set this flag automatically | |
| void | OnChildActivation
(
FBehaviorTreeSearchData& SearchData, |
Called before passing search to child node | |
| void | OnChildActivation
(
FBehaviorTreeSearchData& SearchData, |
Called before passing search to child node | |
| void | OnChildDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Notification called after child has finished search | |
| void | OnChildDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Notification called after child has finished search | |
| void | OnNodeActivation
(
FBehaviorTreeSearchData& SearchData |
Called when start enters this node | |
| void | OnNodeDeactivation
(
FBehaviorTreeSearchData& SearchData, |
Called when search leaves this node | |
| void | OnNodeRestart
(
FBehaviorTreeSearchData& SearchData |
Called when search needs to reactivate this node | |
| void | RequestDelayedExecution
(
UBehaviorTreeComponent& OwnerComp, |
Store delayed execution request | |
| void | SetChildOverride
(
FBehaviorTreeSearchData& SearchData, |
Set override for next child index |
Overridden from UBTNode
| Type | Name | Description | |
|---|---|---|---|
| void | DescribeRuntimeValues
(
const UBehaviorTreeComponent& OwnerComp, |
Gathers description of all runtime parameters | |
| uint16 | Size of instance memory |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | OnChildDeactivation
(
FBehaviorTreeSearchData& SearchData, |
This function is deprecated. Please use RequestBranchDeactivation instead. | |
| void | OnChildDeactivation
(
FBehaviorTreeSearchData& SearchData, |
This function is deprecated. Please use RequestBranchDeactivation instead. |