Looking at the UGameInstance.cpp function
As shown below,
If WorldType is EWorldType :: PIE
(ie, in the Editor’s Play => Selected Viewport or Play => VR Preview)
UGameInstance :: StartRecordingReplay function is disabled.
So, I tried to modify the source (commenting like // return) and try to record and play the demo file in PIE mode. But It does not play properly. I want to know how to solve this problem.
void UGameInstance::StartRecordingReplay(const FString& Name, const FString& FriendlyName, const TArray<FString>& AdditionalOptions)
{
.....
if ( CurrentWorld->WorldType == EWorldType::PIE )
{
UE_LOG(LogDemo, Warning, TEXT("UGameInstance::StartRecordingReplay: Function called while running a PIE instance, this is disabled."));
return;
}
......
}