UBTTask_RunBehavior

RunBehavior task allows pushing subtrees on execution stack.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

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

Include

#include "BehaviorTree/Tasks/BTTask_RunBehavior.h"

Syntax

class UBTTask_RunBehavior : public UBTTaskNode

Remarks

RunBehavior task allows pushing subtrees on execution stack. Subtree asset can't be changed in runtime!

This limitation is caused by support for subtree's root level decorators, which are injected into parent tree, and structure of running tree cannot be modified in runtime (see: BTNode: ExecutionIndex, MemoryOffset)

Use RunBehaviorDynamic task for subtrees that need to be changed in runtime.

Variables

Name Description

Protected variable

UBehaviorTree &...

 

BehaviorAsset

Behavior to run

Constructors

Name Description

Public function

UBTTask_RunBehavior

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

int32

 

GetInjectedNodesCount()

Public function Const

UBehaviorTre...

 

GetSubtreeAsset()

Protected function Virtual

void

 

OnSubtreeDeactivated

(
    UBehaviorTreeComponent& OwnerComp,
    EBTNodeResult::Type NodeResult
)

Called when subtree is removed from active stack

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

FName

 

GetNodeIconName()

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

Public function Virtual Const

FString

 

GetStaticDescription()

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