Navigation
API > API/Runtime > API/Runtime/AIModule
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.
| Name | UBTTask_RunBehavior |
| Type | class |
| Header File | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Tasks/BTTask_RunBehavior.h |
| Include Path | #include "BehaviorTree/Tasks/BTTask_RunBehavior.h" |
Syntax
UCLASS (MinimalAPI)
class UBTTask_RunBehavior : public UBTTaskNode
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBTNode → UBTTaskNode → UBTTask_RunBehavior
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBTTask_RunBehavior
(
const FObjectInitializer& ObjectInitializer |
BehaviorTree/Tasks/BTTask_RunBehavior.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 GetInjectedNodesCount() |
BehaviorTree/Tasks/BTTask_RunBehavior.h | ||
UBehaviorTree * GetSubtreeAsset() |
BehaviorTree/Tasks/BTTask_RunBehavior.h |
Overridden from UBTTaskNode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EBTNodeResult::Type ExecuteTask
(
UBehaviorTreeComponent& OwnerComp, |
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! | BehaviorTree/Tasks/BTTask_RunBehavior.h |
Overridden from UBTNode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const UObject * GetAssociatedAsset
(
TOptional< FBehaviorTreeNodeDebugContext > DebugContext |
BehaviorTree/Tasks/BTTask_RunBehavior.h | ||
virtual FName GetNodeIconName() |
Get the name of the icon used to display this node in the editor | BehaviorTree/Tasks/BTTask_RunBehavior.h | |
virtual FString GetStaticDescription() |
BehaviorTree/Tasks/BTTask_RunBehavior.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnSubtreeDeactivated
(
UBehaviorTreeComponent& OwnerComp, |
Called when subtree is removed from active stack | BehaviorTree/Tasks/BTTask_RunBehavior.h |