Hello guys,
currently I want to try out the network replay interface. I’ve already implemented simple blueprint wrapper functions to start / stop recording. Also I have got the “demo listing” up and running.
But now I have dashed against my last task: Playing the demo.
This code should do the stuff (I thought so). While “FastPlayDemoName” is a simple FString containing the (technical) demo name of the last demo found with EnumerateStreams (https://docs.unrealengine.com/latest/INT/API/Runtime/NetworkReplayStreaming/INetworkReplayStreamer/EnumerateStreams/index.html)
GetGameInstance()->PlayReplay(FastPlayDemoName);
When I trigger the function which should run this line (including some logging but nothing more) my engine crashes (in-editor version and built version).
A breakpoint is triggered when I the demo level is already loaded but not if another level is loaded. The breakpoint is leading me to the UnrealEngine.cpp file (UEngine::LoadWorld function).
Directly to this checking line:
// Find the newly loaded world.
NewWorld = UWorld::FindWorldInPackage(WorldPackage);
// If the world was not found, it could be a redirector to a world. If so, follow it to the destination world.
if ( !NewWorld )
{
NewWorld = UWorld::FollowWorldRedirectorInPackage(WorldPackage);
if ( NewWorld )
{
WorldPackage = NewWorld->GetOutermost();
}
}
check(NewWorld);
The replay directory have been found.
While NewWorld is checked, it is just NULL causing the crash. But I have no clue why.
Maybe someone had the same problem or provide any suggestions and could help me?
Many thanks