UBTNode

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

UBTService

UBTService_BlackboardBase

UBTService_DefaultFocus

UBTService_RunEQS

UBTService_BlueprintBase

UTestBTService_BTStopAction

UTestBTService_Log

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

UTestBTTask_BTStopAction

UTestBTTask_LatentWithFlags

UTestBTTask_Log

UTestBTTask_SetFlag

UTestBTTask_SetValue

UTestBTTask_ToggleFlag

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/BehaviorTree/BTNode.h

Include

#include "BehaviorTree/BTNode.h"

Syntax

class UBTNode :
    public UObject,
    public IGameplayTaskOwnerInterface

Variables

Name Description

Protected variable

uint8: 1

 

bCreateNodeInstance

If set, node will be instanced instead of using memory block and template shared with all other BT components

Protected variable

uint8: 1

 

bOwnsGameplayTasks

Set to true if task owns any GameplayTasks.

Public variable

FString

 

NodeName

Node name

Constructors

Name Description

Public function

UBTNode

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

T *

 

CastInstanceNodeMemory

(
    uint8* NodeMemory
)

Public function Const

void

 

CleanupInSubtree

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    EBTMemoryClear::Type CleanupType
)

Called on removing subtree to cleanup memory

Public function Virtual Const

void

 

CleanupMemory

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    EBTMemoryClear::Type CleanupType
)

Cleanup memory block

Public function Virtual Const

void

 

DescribeRuntimeValues

(
    const UBehaviorTreeComponent& Owne...,
    uint8* NodeMemory,
    EBTDescriptionVerbosity::Type Verbo...,
    TArray< FString >& Values
)

Gathers description of all runtime parameters

Public function

void

 

ForceInstancing

(
    bool bEnable
)

Sets bCreateNodeInstance flag, do NOT call this function on already pushed tree instance!

Public function Const

UBlackboardD...

 

GetBlackboardAsset()

Public function Const

UBehaviorTre...

 

GetBTComponentForTask

(
    UGameplayTask& Task
)

Public function Const

uint16

 

GetExecutionIndex()

Public function Virtual Const

uint16

 

GetInstanceMemorySize()

Size of instance memory

Public function Const

uint16

 

GetMemoryOffset()

Public function Const

UBTNode *...

 

GetNextNode()

Public function Virtual Const

FName

 

GetNodeIconName()

Get the name of the icon used to display this node in the editor

Public function Const

UBTNode *...

 

GetNodeInstance

(
    const UBehaviorTreeComponent& Owne...,
    uint8* NodeMemory
)

Public function Const

UBTNode *...

 

GetNodeInstance

(
    FBehaviorTreeSearchData& SearchDat...
)

Public function Const

const T *...

 

GetNodeMemory

(
    const FBehaviorTreeInstance& BTIns...
)

Public function Const

T *

 

GetNodeMemory

(
    FBehaviorTreeInstance& BTInstance
)

Public function Const

const T *...

 

GetNodeMemory

(
    const FBehaviorTreeSearchData& Sea...
)

Public function Const

T *

 

GetNodeMemory

(
    FBehaviorTreeSearchData& SearchDat...
)

Public function Const

FString

 

GetNodeName()

Public function Const

UBTComposite...

 

GetParentNode()

Public function Const

FString

 

GetRuntimeDescription

(
    const UBehaviorTreeComponent& Owne...,
    uint8* NodeMemory,
    EBTDescriptionVerbosity::Type Verbo...
)

Public function Virtual Const

uint16

 

GetSpecialMemorySize()

Size of special, hidden memory block for internal mechanics

Public function Const

T *

 

GetSpecialNodeMemory

(
    uint8* NodeMemory
)

Get special memory block used for hidden shared data (e.g. node instancing)

Public function Virtual Const

FString

 

GetStaticDescription()

Public function Const

UBehaviorTre...

 

GetTreeAsset()

Public function Const

uint8

 

GetTreeDepth()

Public function Virtual Const

UWorld *

 

GetWorld()

Public function Const

bool

 

HasInstance()

Public function

void

 

InitializeExecutionOrder

(
    UBTNode* NextNode
)

Fill in data about execution order

Public function Virtual

void

 

InitializeFromAsset

(
    UBehaviorTree& Asset
)

Initialize any asset related data

Public function Const

void

 

InitializeInSubtree

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    int32& NextInstancedIndex,
    EBTMemoryInit::Type InitType
)

Called on creating subtree to set up memory and instancing

Public function Virtual Const

void

 

InitializeMemory

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    EBTMemoryInit::Type InitType
)

Initialize memory block

Public function

void

 

InitializeNode

(
    UBTCompositeNode* InParentNode,
    uint16 InExecutionIndex,
    uint16 InMemoryOffset,
    uint8 InTreeDepth
)

Fill in data about tree structure

Public function Const

bool

 

IsInjected()

Public function Const

bool

 

IsInstanced()

Public function

void

 

MarkInjectedNode()

Sets bIsInjected flag, do NOT call this function unless you really know what you are doing!

Public function

T *

 

NewBTAITask

(
    UBehaviorTreeComponent& BTComponen...
)

Public function

T *

 

NewBTAITask

(
    const UClass& Class,
    UBehaviorTreeComponent& BTComponen...
)

Public function Virtual

void

 

OnInstanceCreated

(
    UBehaviorTreeComponent& OwnerComp
)

Called when node instance is added to tree

Public function Virtual

void

 

OnInstanceDestroyed

(
    UBehaviorTreeComponent& OwnerComp
)

Called when node instance is removed from tree

Public function Virtual

void

 

OnNodeCreated()

Called after creating new node in behavior tree editor, use for versioning

Public function Virtual

void

 

SetOwner

(
    AActor* ActorOwner
)

Gets called only for instanced nodes(bCreateNodeInstance == true).

Public function Virtual Const

bool

 

UsesBlueprint()

Get whether this node is using a blueprint for its logic

Overridden from IGameplayTaskOwnerInterface

Name Description

Public function Virtual Const

AActor *

 

GetGameplayTaskAvatar

(
    const UGameplayTask* Task
)

Get "body" of task's owner / default, having location in world (e.g. Owner = AIController, Avatar = Pawn)

Public function Virtual Const

uint8

 

GetGameplayTaskDefaultPriority()

Get default priority for running a task

Public function Virtual Const

AActor *

 

GetGameplayTaskOwner

(
    const UGameplayTask* Task
)

Get owner of a task or default one when task is null

Public function Virtual Const

UGameplayTas...

 

GetGameplayTasksComponent

(
    const UGameplayTask& Task
)

Finds tasks component for given GameplayTask, Task.GetGameplayTasksComponent() may not be initialized at this point!

Public function Virtual

void

 

OnGameplayTaskInitialized

(
    UGameplayTask& Task
)

Notify called after GameplayTask finishes initialization (not active yet)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel