Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/BehaviorTree
Inheritance Hierarchy
- UObject
- IGameplayTaskOwnerInterface
- UBTNode
- UBTAuxiliaryNode
- UBTDecorator
- UBTDecorator_BlackboardBase
- UBTDecorator_Blackboard
- UBTDecorator_ConditionalLoop
- UBTDecorator_IsAtLocation
- UBTDecorator_IsBBEntryOfClass
- UBTDecorator_BlueprintBase
- 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
- UBTService
- UBTService_BlackboardBase
- UBTService_DefaultFocus
- UBTService_RunEQS
- UBTService_BlueprintBase
- UBTCompositeNode
- UBTComposite_Selector
- UBTComposite_Sequence
- UBTComposite_SimpleParallel
- UBTTaskNode
- UBTTask_BlackboardBase
- UBTTask_MoveTo
- UBTTask_MoveDirectlyToward
- UBTTask_RotateToFaceBBEntry
- UBTTask_RunEQSQuery
- UBTTask_BlueprintBase
- UBTTask_FindAndUseGameplayBehaviorSmartObject
- UBTTask_FinishWithResult
- UBTTask_GameplayTaskBase
- UBTTask_MakeNoise
- UBTTask_PawnActionBase
- UBTTask_PushPawnAction
- UBTTask_PlayAnimation
- UBTTask_PlaySound
- UBTTask_RunBehavior
- UBTTask_RunBehaviorDynamic
- UBTTask_SetTagCooldown
- UBTTask_StopGameplayBehavior
- UBTTask_Wait
- UBTTask_WaitBlackboardTime
References
| Module | AIModule |
| Header | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BTNode.h |
| Include | #include "BehaviorTree/BTNode.h" |
Syntax
UCLASS (Abstract, Config=Game, MinimalAPI)
class UBTNode :
public UObject,
public IGameplayTaskOwnerInterface
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint8: 1 | bCreateNodeInstance | If set, node will be instanced instead of using memory block and template shared with all other BT components | |
| uint8: 1 | bOwnsGameplayTasks | Set to true if task owns any GameplayTasks. | |
| FString | NodeName | Node name |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UBTNode
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| T * | CastInstanceNodeMemory
(
uint8* NodeMemory |
||
| void | CleanupInSubtree
(
UBehaviorTreeComponent& OwnerComp, |
Called on removing subtree to cleanup memory | |
| void | CleanupMemory
(
UBehaviorTreeComponent& OwnerComp, |
Cleanup memory block. CleanupNodeMemory template function is provided to help cleanup the memory. | |
| void | CleanupNodeMemory
(
uint8* NodeMemory, |
||
| void | DescribeRuntimeValues
(
const UBehaviorTreeComponent& OwnerComp, |
Gathers description of all runtime parameters | |
| void | ForceInstancing
(
bool bEnable |
Sets bCreateNodeInstance flag, do NOT call this function on already pushed tree instance! | |
| UBlackboardData * | |||
| UBehaviorTreeComponent * | GetBTComponentForTask
(
UGameplayTask& Task |
||
| FString | Validates this node and returns the resulting error message. Empty means no error. | ||
| uint16 | |||
| AActor * | GetGameplayTaskAvatar
(
const UGameplayTask* Task |
||
| uint8 | |||
| AActor * | GetGameplayTaskOwner
(
const UGameplayTask* Task |
||
| UGameplayTasksComponent * | GetGameplayTasksComponent
(
const UGameplayTask& Task |
||
| uint16 | Size of instance memory | ||
| uint16 | |||
| UBTNode * | GetNextNode () |
||
| FName | Get the name of the icon used to display this node in the editor | ||
| const ISlateStyle & | Get the style set from which GetNodeIconName is queried | ||
| UBTNode * | GetNodeInstance
(
const UBehaviorTreeComponent& OwnerComp, |
||
| UBTNode * | GetNodeInstance
(
FBehaviorTreeSearchData& SearchData |
||
| const T * | GetNodeMemory
(
const FBehaviorTreeInstance& BTInstance |
||
| T * | GetNodeMemory
(
FBehaviorTreeInstance& BTInstance |
||
| const T * | GetNodeMemory
(
const FBehaviorTreeSearchData& SearchData |
||
| T * | GetNodeMemory
(
FBehaviorTreeSearchData& SearchData |
||
| FString | GetNodeName () |
||
| UBTCompositeNode * | |||
| FString | GetRuntimeDescription
(
const UBehaviorTreeComponent& OwnerComp, |
||
| uint16 | Size of special, hidden memory block for internal mechanics | ||
| T * | GetSpecialNodeMemory
(
uint8* NodeMemory |
Get special memory block used for hidden shared data (e.g. node instancing) | |
| FString | |||
| UBehaviorTree * | GetTreeAsset () |
||
| uint8 | GetTreeDepth () |
||
| UWorld * | GetWorld () |
||
| bool | HasInstance () |
||
| void | InitializeExecutionOrder
(
UBTNode* NextNode |
Fill in data about execution order | |
| void | InitializeFromAsset
(
UBehaviorTree& Asset |
Initialize any asset related data | |
| void | InitializeInSubtree
(
UBehaviorTreeComponent& OwnerComp, |
Called on creating subtree to set up memory and instancing | |
| void | InitializeMemory
(
UBehaviorTreeComponent& OwnerComp, |
Initialize memory block. | |
| void | InitializeNode
(
UBTCompositeNode* InParentNode, |
Fill in data about tree structure | |
| T * | InitializeNodeMemory
(
uint8* NodeMemory, |
||
| bool | IsInjected () |
||
| bool | IsInstanced () |
||
| void | Sets bIsInjected flag, do NOT call this function unless you really know what you are doing! | ||
| T * | NewBTAITask
(
UBehaviorTreeComponent& BTComponent |
||
| T * | NewBTAITask
(
const UClass& Class, |
||
| void | OnGameplayTaskInitialized
(
UGameplayTask& Task |
||
| void | OnInstanceCreated
(
UBehaviorTreeComponent& OwnerComp |
Called when node instance is added to tree | |
| void | OnInstanceDestroyed
(
UBehaviorTreeComponent& OwnerComp |
Called when node instance is removed from tree | |
| void | Called after creating new node in behavior tree editor, use for versioning | ||
| void | SetOwner
(
AActor* ActorOwner |
Gets called only for instanced nodes(bCreateNodeInstance == true). | |
| bool | Get whether this node is using a blueprint for its logic |