RealDocs

UAnimInstance::BlueprintInitializeAnimation

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

Description

Blueprint event called once when the anim instance is initialized, before any animation updates. Override this in your Animation Blueprint to cache references to the owning pawn, set up initial state, and prepare variables used during animation updates.

Caveats & Gotchas

  • This event fires only once during initialization — if you need to re-initialize state when the pawn changes, listen for pawn-change notifications separately rather than relying on this being called again.
  • Runs on the game thread before any parallel animation work begins, so heavy logic here delays the first animation frame. Keep initialization lightweight and defer expensive lookups to lazy evaluation during updates.

Signature

virtual void BlueprintInitializeAnimation()

Return Type

void

Example

Cache pawn reference on initialization C++
// In your Animation Blueprint event graph:
// 1. Override BlueprintInitializeAnimation
// 2. Call TryGetPawnOwner and cast to your character class
// 3. Store the result in a variable for use in BlueprintUpdateAnimation

// C++ equivalent in a custom UAnimInstance subclass:
void UMyAnimInstance::NativeInitializeAnimation()
{
    Super::NativeInitializeAnimation();
    OwningCharacter = Cast<AMyCharacter>(TryGetPawnOwner());
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.