UAnimInstance::BlueprintBeginPlay
#include "Animation/AnimInstance.h"
Access: public
Specifiers: UFUNCTIONBlueprintImplementableEvent
Description
Blueprint-implementable event called when BeginPlay is triggered on the owning skeletal mesh component. Override this in an Animation Blueprint to run one-time initialization logic that requires the world to be running.
Caveats & Gotchas
- • This is the Blueprint equivalent of NativeBeginPlay. In a C++ subclass you should override NativeBeginPlay instead; BlueprintBeginPlay is only called when an Animation Blueprint implements it.
- • Unlike AActor::BeginPlay, this event is tied to the owning SkeletalMeshComponent's BeginPlay, which fires slightly after the actor's own BeginPlay. Do not rely on actor components being fully initialized at this point.
Signature
ENGINE_API void BlueprintBeginPlay(); Return Type
void Example
Caching owner reference at begin play in an Animation Blueprint text
// In Animation Blueprint Event Graph:
// Event BlueprintBeginPlay
// -> Try Get Pawn Owner -> Cast To AMyCharacter
// -> Store as local variable 'OwnerCharacter'
// Use OwnerCharacter in NativeUpdateAnimation to avoid repeated casts each frame. See Also
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?