UAnimInstance
#include "Animation/AnimInstance.h" Description
The runtime instance of an Animation Blueprint, responsible for evaluating the anim graph and driving a skeletal mesh. You subclass this in C++ or Blueprint to implement custom animation logic.
Caveats & Gotchas
- • UAnimInstance is constrained to live Within=SkeletalMeshComponent — you cannot manually construct one and attach it to arbitrary objects.
- • Access the instance at runtime via USkeletalMeshComponent::GetAnimInstance(). It may be null if no Animation Blueprint is assigned.
- • Montage and curve APIs are on UAnimInstance, not on the mesh component — get the instance first.
Example
Get the anim instance from a mesh component C++
UAnimInstance* AnimInst = GetMesh()->GetAnimInstance();
if (AnimInst)
{
AnimInst->Montage_Play(MyMontage);
} Functions (4)
Curves 1 ▼
| Access | Type | Name |
|---|---|---|
| public | function | UAnimInstance::GetCurveValue |
Montage 3 ▼
| Access | Type | Name |
|---|---|---|
| public | function | UAnimInstance::Montage_IsPlaying |
| public | function | UAnimInstance::Montage_Play |
| public | function | UAnimInstance::Montage_Stop |
See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?