Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/BehaviorTree > API/Runtime/AIModule/BehaviorTree/Tasks
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UBTNode
- UBTTaskNode
- UBTTask_PlayAnimation
References
| Module | AIModule |
| Header | /Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Tasks/BTTask_PlayAnimation.h |
| Include | #include "BehaviorTree/Tasks/BTTask_PlayAnimation.h" |
Syntax
class UBTTask_PlayAnimation : public UBTTaskNode
Remarks
Play indicated AnimationAsset on Pawn controlled by BT Note that this node is generic and is handing multiple special cases, If you want a more efficient solution you'll need to implement it yourself (or wait for our BTTask_PlayCharacterAnimation)
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UAnimationAsset > | AnimationToPlay | Animation asset to play. Note that it needs to match the skeleton of pawn this BT is controlling | |
| uint32: 1 | bLooping | ||
| uint32: 1 | bNonBlocking | If true the task will just trigger the animation and instantly finish. Fire and Forget. | |
| TObjectPtr< USkeletalMeshComponent > | CachedSkelMesh | ||
| TObjectPtr< UBehaviorTreeComponent > | MyOwnerComp | ||
| EAnimationMode::Type | PreviousAnimationMode | ||
| FTimerDelegate | TimerDelegate | ||
| FTimerHandle | TimerHandle |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UBTTask_PlayAnimation
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CleanUp
(
UBehaviorTreeComponent& OwnerComp |
||
| void |
Overridden from UBTTaskNode
| Type | Name | Description | |
|---|---|---|---|
| EBTNodeResult::Type | AbortTask
(
UBehaviorTreeComponent& OwnerComp, |
Aborts this task, should return Aborted or InProgress (use FinishLatentAbort() when returning InProgress) this function should be considered as const (don't modify state of object) if node is not instanced! | |
| 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! |