RealDocs

UAnimInstance::OnMontageEnded

property Engine Blueprint Since 4.5
#include "Animation/AnimInstance.h"
Access: public Specifiers: UPROPERTYBlueprintAssignable

Description

Delegate broadcast when a montage finishes playing and its blend-out is complete. Fires whether the montage ended naturally or was interrupted, with the bInterrupted flag indicating which.

Caveats & Gotchas

  • Unlike OnMontageBlendingOut, this fires after the montage weight has reached 0 and the montage instance has been removed. The montage is no longer affecting the pose when this is called.
  • If two montages play in the same group back-to-back, the first montage's OnMontageEnded may fire before the second one's OnMontageStarted on the same frame. Avoid logic that relies on a specific ordering between these delegates.

Signature

UPROPERTY(BlueprintAssignable)
FOnMontageEnded OnMontageEnded;

Example

Re-enable movement after a full-body montage ends C++
AnimInstance->OnMontageEnded.AddDynamic(this, &AMyCharacter::HandleMontageEnded);

void AMyCharacter::HandleMontageEnded(UAnimMontage* Montage, bool bInterrupted)
{
    if (Montage == FullBodyMontage && !bInterrupted)
    {
        GetCharacterMovement()->SetMovementMode(MOVE_Walking);
    }
}

Version History

Introduced in: 4.5

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.