RealDocs

UAnimInstance::WasAnimNotifyNameTriggeredInAnyState

function Engine Blueprint Since 4.11
#include "Animation/AnimInstance.h"
Access: public Specifiers: UFUNCTIONBlueprintPure

Description

Returns true if a notify with the given name was triggered anywhere across all state machines during the last frame. The name-based equivalent of WasAnimNotifyTriggeredInAnyState — convenient for notifies created as assets without a custom C++ class.

Caveats & Gotchas

  • Name matching is case-sensitive; a notify asset named 'footstep' will not match a query for 'Footstep'.
  • Prefer the class-based variant (WasAnimNotifyTriggeredInAnyState) whenever a C++ notify class exists, as it is more robust to asset renames and supports compile-time type checking.

Signature

UFUNCTION(BlueprintPure, Category="Animation")
bool WasAnimNotifyNameTriggeredInAnyState(FName NotifyName) const;

Parameters

Name Type Description Default
NotifyName FName Name of the notify to check for.

Return Type

bool

Example

Detect a sound cue notify by name C++
if (WasAnimNotifyNameTriggeredInAnyState(FName("AN_Footstep")))
{
    PlayFootstepSound();
}

Version History

Introduced in: 4.11

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.