UBTTask_RunBehaviorDynamic

RunBehaviorDynamic task allows pushing subtrees on execution stack.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Tasks/BTTask_RunBehaviorDynamic.h

Include

#include "BehaviorTree/Tasks/BTTask_RunBehaviorDynamic.h"

Syntax

class UBTTask_RunBehaviorDynamic : public UBTTaskNode

Remarks

RunBehaviorDynamic task allows pushing subtrees on execution stack. Subtree asset can be assigned at runtime with SetDynamicSubtree function of BehaviorTreeComponent.

Does NOT support subtree's root level decorators!

Variables

Name Description

Protected variable

UBehaviorTree &...

 

BehaviorAsset

Current subtree

Protected variable

UBehaviorTree &...

 

DefaultBehaviorAsset

Default behavior to run

Protected variable

FGameplayTag

 

InjectionTag

Gameplay tag that will identify this task for subtree injection

Constructors

Name Description

Public function

UBTTask_RunBehaviorDynamic

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

bool

 

HasMatchingTag

(
    const FGameplayTag& Tag
)

Protected function Virtual

void

 

OnSubtreeDeactivated

(
    UBehaviorTreeComponent& OwnerComp,
    EBTNodeResult::Type NodeResult
)

Called when subtree is removed from active stack

Public function

bool

 

SetBehaviorAsset

(
    UBehaviorTree* NewBehaviorAsse...
)

Overridden from UBTTaskNode

Name Description

Public function Virtual

EBTNodeResul...

 

ExecuteTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory
)

Starts this task, should return Succeeded, Failed or InProgress (use FinishLatentTask() when returning InProgress) this function should be considered as const (don't modify state of object) if node is not instanced!

Overridden from UBTNode

Name Description

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 Virtual Const

FName

 

GetNodeIconName()

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

Public function Virtual Const

FString

 

GetStaticDescription()

Public function Virtual

void

 

OnInstanceCreated

(
    UBehaviorTreeComponent& OwnerComp
)

Called when node instance is added to tree

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