UAnimInstance::Montage_IsActive
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_APIconstBlueprintPureUFUNCTION
Description
Returns true if the specified montage is currently active (playing or blending out). Pass NULL to check if any montage is active on this instance.
Caveats & Gotchas
- • An active montage includes one that is blending out — it has not fully ended yet. Use Montage_GetIsStopped to distinguish a truly stopped/ended montage from one still transitioning.
- • If multiple montages are running simultaneously (stacked), this returns true as long as the specified montage is among the active ones, regardless of which slot it occupies.
Signature
ENGINE_API bool Montage_IsActive(const UAnimMontage* Montage) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Montage | const UAnimMontage* | The montage to check. If NULL, returns true if any montage is active. | — |
Return Type
bool Example
Gate logic on montage activity C++
void UMyAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
{
if (Montage_IsActive(AttackMontage))
{
// Suppress movement input while attack is active or blending out
bBlockMovement = true;
}
else
{
bBlockMovement = false;
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?