UAnimInstance::IsPlayingSlotAnimation
#include "Animation/AnimInstance.h"
Access: public
Specifiers: UFUNCTIONBlueprintPure
Description
Returns true if the given animation asset is currently playing through the specified slot node. A second overload also returns the active UAnimMontage via an out parameter.
Caveats & Gotchas
- • Returns false during the blend-out phase even though the slot is still contributing to the final pose — use IsSlotActive if you need to know whether the slot is blending.
- • The non-Blueprint overload `IsPlayingSlotAnimation(Asset, SlotNodeName, OutMontage)` also exists for C++ callers who need the active montage pointer, but is not Blueprint-exposed.
Signature
ENGINE_API bool IsPlayingSlotAnimation(const UAnimSequenceBase* Asset, FName SlotNodeName) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Asset | const UAnimSequenceBase* | The animation asset to check. | — |
| SlotNodeName | FName | The slot node to query. | — |
Return Type
bool Example
Guard against double-triggering a reload C++
if (!AnimInstance->IsPlayingSlotAnimation(ReloadAnim, FName("WeaponSlot")))
{
AnimInstance->PlaySlotAnimationAsDynamicMontage(ReloadAnim, FName("WeaponSlot"));
} See Also
Tags
Version History
Introduced in: 4.8
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?