UAnimInstance::GetCurrentActiveMontage
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_APIconstBlueprintPureUFUNCTION
Description
Returns a pointer to the first active montage found on this anim instance. When only one montage is expected to be playing, use this as a quick way to retrieve it without keeping a direct reference.
Caveats & Gotchas
- • If multiple montages are active simultaneously (e.g. one blending in while another blends out), this returns only the first one found — the ordering is not guaranteed. Use Montage_IsActive with a specific reference when precision matters.
- • Returns nullptr if no montage is currently active. Always null-check the result before calling any further montage functions on it.
Signature
ENGINE_API UAnimMontage* GetCurrentActiveMontage() const; Return Type
UAnimMontage* Example
Stop whatever montage is currently playing C++
UAnimMontage* ActiveMontage = AnimInstance->GetCurrentActiveMontage();
if (ActiveMontage)
{
AnimInstance->Montage_Stop(0.25f, ActiveMontage);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?