RealDocs

UActorComponent::ReceiveEndPlay

function Engine Blueprint Since 4.0
#include "Components/ActorComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintImplementableEvent

Description

Blueprint implementable event fired when the component ends play, generally via the actor being destroyed or the level being unloaded.

Caveats & Gotchas

  • Like ReceiveBeginPlay, this is a BlueprintImplementableEvent with no default C++ body. C++ subclasses must override EndPlay() (and call Super) rather than ReceiveEndPlay to add teardown logic.
  • The EndPlayReason parameter is passed through to Blueprint — use it to distinguish between a deliberate actor destruction versus a PIE session ending, since cleanup requirements often differ.

Signature

ENGINE_API void ReceiveEndPlay(EEndPlayReason::Type EndPlayReason)

Parameters

Name Type Description Default
EndPlayReason EEndPlayReason::Type The reason gameplay is ending for this component.

Return Type

void

Example

Responding to End Play in Blueprint text
// In a Blueprint Component's event graph:
// Event End Play (End Play Reason pin available) → (cleanup logic)
// Check End Play Reason to branch on Destroyed vs EndPlayInEditor.

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.