How to resume animation montage after pause

Hi. I have a question about how to resume animation montage after pause. For example:

/** Pauses the animation montage. If reference is NULL, it will stop ALL active montages. */
	UFUNCTION(BlueprintCallable, Category = "Animation")
	void Montage_Pause(UAnimMontage * Montage = NULL);

How to correctly resume to play state? I am tying to use Montage_Play and have unexpected results.

I don’t see one, but if you want to add it to your codebase I image this would work:

AnimMontage.h:

void Resume() { bPlaying = true; }

AnimInstance.h:

UFUNCTION(BlueprintCallable, Category = "Animation")
void Montage_Resume(UAnimMontage * Montage = NULL);

AnimInstance.cpp:

void UAnimInstance::Montage_Resume(UAnimMontage* Montage)
{
	if (Montage)
	{
		FAnimMontageInstance* MontageInstance = GetActiveInstanceForMontage(*Montage);
		if (MontageInstance)
		{
			MontageInstance->Resume();
		}
	}
}

Thanks for your answer. But it is not a solution. I am trying to do bPlaying = true but this is not enough. I am doing a next sequence of actions:

My character is falling (dead). Before this:

if (AnimInstance->Montage_IsPlaying(Montage))
	AnimInstance->Montage_JumpToSection(Montage->GetSectionName(SectionID), Montage);
else
	Character->PlayAnimMontage(Montage, 1.f, Montage->GetSectionName(SectionID));
Memory->Interval = Montage->GetSectionLength(SectionID);

Next I am waiting for Memory->Interval. After it was expired I am freezing the pose of the character:

auto MeshComponent = GetMesh();
MeshComponent->GlobalAnimRateScale = 0.f;
GetAnimInstance()->Montage_Pause();

Then my character has begun to recovery.

// Unfreeze
auto MeshComponent = GetMesh();
MeshComponent->GlobalAnimRateScale = 1.f;

if (AnimInstance->Montage_IsPlaying(Montage))
	AnimInstance->Montage_JumpToSection(Montage->GetSectionName(SectionID), Montage);
else
	Character->PlayAnimMontage(Montage, 1.f, Montage->GetSectionName(SectionID));	
Memory->RecoveryInterval = Montage->GetSectionLength(SectionID);

I am waiting for recovery. And character was killed during recovery. And we are following to paragraph 1. At this point I am waiting for section playing. But at the end of playing montage was interrupted (blendout = 0). All sections was looped and I can not understand the reason for an interrupt.

Sorry, but I don’t see a way around that problem. There’s code in the animation system that automatically kills the animation if it’s paused (i.e. the weight is zero). It would be a rats nest to try to fix that.

My only other suggestion is to slow it down a lot, then restore it. Pause by calling SetPlayRate(0.001f), then restore by calling SetPlayRate(1.0f).