UAnimInstance::ShouldTriggerAnimNotifyState
#include "Animation/AnimInstance.h"
Access: public
Specifiers: virtual
Description
Called by the notify dispatch system to decide whether a given AnimNotifyState should actually fire this frame. Override to globally filter or suppress notify states.
Caveats & Gotchas
- • Default implementation always returns true — overriding without calling the parent (there is nothing to call, but be sure you intend to gate every notify state) suppresses all of them.
- • Evaluated for every active notify state every tick it would otherwise trigger, so keep the override cheap.
- • This only gates AnimNotifyState (Begin/Tick/End) triggering, not instantaneous AnimNotify events.
Signature
virtual bool ShouldTriggerAnimNotifyState(const UAnimNotifyState* AnimNotifyState) const Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AnimNotifyState | const UAnimNotifyState* | The notify state instance being considered for triggering. | — |
Return Type
bool Example
Suppress notify states while the pawn is dead C++
bool UMyAnimInstance::ShouldTriggerAnimNotifyState(const UAnimNotifyState* AnimNotifyState) const
{
if (bIsDead)
{
return false;
}
return Super::ShouldTriggerAnimNotifyState(AnimNotifyState);
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?