How can I bind a function to AnimInstance->OnMontageEnd?

// Function declaration in header
void OnAnimationEnded(UAnimMontage* Montage, bool bInterrupted);

// In implementation
// Declare delegate
FOnMontageEnded EndDelegate;
 // Bind it
EndDelegate.BindUObject(this, &UMyClass::OnAnimationEnded);
//Set it
MyAnimInstance->Montage_SetEndDelegate(EndDelegate);
4 Likes