Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/BehaviorTree > API/Runtime/AIModule/BehaviorTree/Tasks
Inheritance Hierarchy
- UObject
- IGameplayTaskOwnerInterface
- UBTNode
- UBTTaskNode
- UBTTask_RunBehaviorDynamic
References
| Module | AIModule |
| Header | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Tasks/BTTask_RunBehaviorDynamic.h |
| Include | #include "BehaviorTree/Tasks/BTTask_RunBehaviorDynamic.h" |
Syntax
UCLASS (MinimalAPI)
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
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UBehaviorTree > | BehaviorAsset | Current subtree | |
| TObjectPtr< UBehaviorTree > | DefaultBehaviorAsset | Default behavior to run | |
| FGameplayTag | InjectionTag | Gameplay tag that will identify this task for subtree injection |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UBTTask_RunBehaviorDynamic
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UBehaviorTree * | GetBehaviorAssetFromRuntimeValue
(
const FString& RuntimeValue |
||
| UBehaviorTree * | |||
| const FGameplayTag & | |||
| bool | HasMatchingTag
(
const FGameplayTag& Tag |
||
| void | OnSubtreeDeactivated
(
UBehaviorTreeComponent& OwnerComp, |
Called when subtree is removed from active stack | |
| bool | SetBehaviorAsset
(
UBehaviorTree* NewBehaviorAsset |
Overridden from UBTTaskNode
| Type | Name | Description | |
|---|---|---|---|
| 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! |
Overridden from UBTNode
| Type | Name | Description | |
|---|---|---|---|
| void | DescribeRuntimeValues
(
const UBehaviorTreeComponent& OwnerComp, |
Gathers description of all runtime parameters | |
| FName | Get the name of the icon used to display this node in the editor | ||
| FString | |||
| void | OnInstanceCreated
(
UBehaviorTreeComponent& OwnerComp |
Called when node instance is added to tree |