UAnimInstance::Montage_SetBlendingOutDelegate
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_API
Description
Binds a delegate that fires the moment a montage begins its blend-out phase — earlier than the end delegate, while the animation is still visible and weight is non-zero.
Caveats & Gotchas
- • This fires at the start of blend-out, not at the end. The montage instance is still alive and queryable at this point, but it will be destroyed sometime after this callback completes.
- • If a montage is interrupted (e.g., by Montage_Stop), this delegate fires immediately regardless of where in the montage playback was. Do not assume the montage played to completion when this callback runs — check the bInterrupted parameter.
- • Only one delegate can be set per montage instance. Calling this twice for the same instance overwrites the first binding without any warning.
Signature
ENGINE_API void Montage_SetBlendingOutDelegate(FOnMontageBlendingOutStarted& InOnMontageBlendingOut, UAnimMontage* Montage = nullptr); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InOnMontageBlendingOut | FOnMontageBlendingOutStarted& | The delegate to fire when the montage begins blending out. | — |
| Montage | UAnimMontage* | Target montage instance. Defaults to the topmost active montage instance if nullptr. | nullptr |
Return Type
void Example
Begin transitioning out before the montage fully ends C++
FOnMontageBlendingOutStarted BlendingOutDelegate;
BlendingOutDelegate.BindUObject(this, &AMyCharacter::OnAttackBlendingOut);
AnimInstance->Montage_SetBlendingOutDelegate(BlendingOutDelegate, AttackMontage);
// In the callback:
void AMyCharacter::OnAttackBlendingOut(UAnimMontage* Montage, bool bInterrupted)
{
// Re-enable movement inputs early, while the blend-out is still playing
GetCharacterMovement()->SetMovementMode(MOVE_Walking);
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?