Navigation
API > API/Runtime > API/Runtime/AIModule
| Name | UBTNode |
| Type | class |
| Header File | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BTNode.h |
| Include Path | #include "BehaviorTree/BTNode.h" |
Syntax
UCLASS (Abstract, Config=Game, MinimalAPI)
class UBTNode :
public UObject ,
public IGameplayTaskOwnerInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBTNode
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBTNode
(
const FObjectInitializer& ObjectInitializer |
BehaviorTree/BTNode.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NodeName | FString | Node name | BehaviorTree/BTNode.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsInjected | uint8 | If set, node is injected by subtree. Should never be set manually | BehaviorTree/BTNode.h | |
| bIsInstanced | uint8 | Set automatically for node instances. Should never be set manually | BehaviorTree/BTNode.h | |
| ExecutionIndex | uint16 | Depth first index (execution order) | BehaviorTree/BTNode.h | |
| MemoryOffset | uint16 | Instance memory offset | BehaviorTree/BTNode.h | |
| NextExecutionNode | UBTNode * | Next node in execution order | BehaviorTree/BTNode.h | |
| ParentNode | TObjectPtr< UBTCompositeNode > | Parent node | BehaviorTree/BTNode.h | |
| TreeAsset | TObjectPtr< UBehaviorTree > | Source asset | BehaviorTree/BTNode.h | |
| TreeDepth | uint8 | Depth in tree | BehaviorTree/BTNode.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T * CastInstanceNodeMemory
(
uint8* NodeMemory |
BehaviorTree/BTNode.h | ||
void CleanupInSubtree
(
UBehaviorTreeComponent& OwnerComp, |
Called on removing subtree to cleanup memory | BehaviorTree/BTNode.h | |
virtual void CleanupMemory
(
UBehaviorTreeComponent& OwnerComp, |
Cleanup memory block. CleanupNodeMemory template function is provided to help cleanup the memory. | BehaviorTree/BTNode.h | |
void CleanupNodeMemory
(
uint8* NodeMemory, |
BehaviorTree/BTNode.h | ||
virtual void DescribeRuntimeValues
(
const UBehaviorTreeComponent& OwnerComp, |
Gathers description of all runtime parameters | BehaviorTree/BTNode.h | |
void ForceInstancing
(
bool bEnable |
Sets bCreateNodeInstance flag, do NOT call this function on already pushed tree instance! | BehaviorTree/BTNode.h | |
virtual const UObject * GetAssociatedAsset
(
TOptional< FBehaviorTreeNodeDebugContext > DebugContext |
BehaviorTree/BTNode.h | ||
UBlackboardData * GetBlackboardAsset() |
BehaviorTree/BTNode.h | ||
UBehaviorTreeComponent * GetBTComponentForTask
(
UGameplayTask& Task |
BehaviorTree/BTNode.h | ||
virtual FString GetErrorMessage() |
Validates this node and returns the resulting error message. Empty means no error. | BehaviorTree/BTNode.h | |
uint16 GetExecutionIndex() |
BehaviorTree/BTNode.h | ||
virtual uint16 GetInstanceMemorySize() |
Size of instance memory | BehaviorTree/BTNode.h | |
uint16 GetMemoryOffset() |
BehaviorTree/BTNode.h | ||
UBTNode * GetNextNode() |
BehaviorTree/BTNode.h | ||
virtual FName GetNodeIconName() |
Get the name of the icon used to display this node in the editor | BehaviorTree/BTNode.h | |
virtual const ISlateStyle & GetNodeIconStyleSet() |
Get the style set from which GetNodeIconName is queried | BehaviorTree/BTNode.h | |
UBTNode * GetNodeInstance
(
const UBehaviorTreeComponent& OwnerComp, |
BehaviorTree/BTNode.h | ||
UBTNode * GetNodeInstance
(
FBehaviorTreeSearchData& SearchData |
BehaviorTree/BTNode.h | ||
const T * GetNodeMemory
(
const FBehaviorTreeInstance& BTInstance |
BehaviorTree/BTNode.h | ||
T * GetNodeMemory
(
FBehaviorTreeInstance& BTInstance |
BehaviorTree/BTNode.h | ||
const T * GetNodeMemory
(
const FBehaviorTreeSearchData& SearchData |
BehaviorTree/BTNode.h | ||
T * GetNodeMemory
(
FBehaviorTreeSearchData& SearchData |
BehaviorTree/BTNode.h | ||
FString GetNodeName() |
BehaviorTree/BTNode.h | ||
UBTCompositeNode * GetParentNode() |
BehaviorTree/BTNode.h | ||
FString GetRuntimeDescription
(
const UBehaviorTreeComponent& OwnerComp, |
BehaviorTree/BTNode.h | ||
virtual uint16 GetSpecialMemorySize() |
Size of special, hidden memory block for internal mechanics | BehaviorTree/BTNode.h | |
T * GetSpecialNodeMemory
(
uint8* NodeMemory |
Get special memory block used for hidden shared data (e.g. node instancing) | BehaviorTree/BTNode.h | |
virtual FString GetStaticDescription() |
BehaviorTree/BTNode.h | ||
UBehaviorTree * GetTreeAsset() |
BehaviorTree/BTNode.h | ||
uint8 GetTreeDepth() |
BehaviorTree/BTNode.h | ||
virtual UWorld * GetWorld() |
BehaviorTree/BTNode.h | ||
bool HasInstance() |
BehaviorTree/BTNode.h | ||
void InitializeExecutionOrder
(
UBTNode* NextNode |
Fill in data about execution order | BehaviorTree/BTNode.h | |
virtual void InitializeFromAsset
(
UBehaviorTree& Asset |
Initialize any asset related data | BehaviorTree/BTNode.h | |
void InitializeInSubtree
(
UBehaviorTreeComponent& OwnerComp, |
Called on creating subtree to set up memory and instancing | BehaviorTree/BTNode.h | |
virtual void InitializeMemory
(
UBehaviorTreeComponent& OwnerComp, |
Initialize memory block. | BehaviorTree/BTNode.h | |
void InitializeNode
(
UBTCompositeNode* InParentNode, |
Fill in data about tree structure | BehaviorTree/BTNode.h | |
T * InitializeNodeMemory
(
uint8* NodeMemory, |
BehaviorTree/BTNode.h | ||
bool IsInjected() |
BehaviorTree/BTNode.h | ||
bool IsInstanced() |
BehaviorTree/BTNode.h | ||
void MarkInjectedNode() |
Sets bIsInjected flag, do NOT call this function unless you really know what you are doing! | BehaviorTree/BTNode.h | |
T * NewBTAITask
(
UBehaviorTreeComponent& BTComponent |
BehaviorTree/BTNode.h | ||
T * NewBTAITask
(
const UClass& Class, |
BehaviorTree/BTNode.h | ||
virtual void OnInstanceCreated
(
UBehaviorTreeComponent& OwnerComp |
Called when node instance is added to tree | BehaviorTree/BTNode.h | |
virtual void OnInstanceDestroyed
(
UBehaviorTreeComponent& OwnerComp |
Called when node instance is removed from tree | BehaviorTree/BTNode.h | |
virtual void OnNodeCreated() |
Called after creating new node in behavior tree editor, use for versioning | BehaviorTree/BTNode.h | |
| Gets called only for instanced nodes(bCreateNodeInstance == true). | BehaviorTree/BTNode.h | ||
virtual bool UsesBlueprint() |
Get whether this node is using a blueprint for its logic | BehaviorTree/BTNode.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PreSave
(
FObjectPreSaveContext SaveContext |
BehaviorTree/BTNode.h |
Overridden from IGameplayTaskOwnerInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual AActor * GetGameplayTaskAvatar
(
const UGameplayTask* Task |
BehaviorTree/BTNode.h | ||
virtual uint8 GetGameplayTaskDefaultPriority() |
BehaviorTree/BTNode.h | ||
virtual AActor * GetGameplayTaskOwner
(
const UGameplayTask* Task |
BehaviorTree/BTNode.h | ||
virtual UGameplayTasksComponent * GetGameplayTasksComponent
(
const UGameplayTask& Task |
BehaviorTree/BTNode.h | ||
virtual void OnGameplayTaskInitialized
(
UGameplayTask& Task |
BehaviorTree/BTNode.h |