Hi all,
We’re trying to implement a “Killcam” using the UE4 Replay system. We’re going by this documentation about implementing replays: DemoNetDriver and Streamers | Unreal Engine Documentation. We’re using the Memory streamer and really struggling to get it working.
The memory streamer uses a Dynamically duplicated level to playback the replay so that live play isn’t affected when the replay plays. The only example I can find of this being implemented anywhere is in Unreal Tournament but that was done on an older version of the engine and I’ve tried using a similar implementation on our end. It has major issues and I can’t seem to get playback to happen properly. It transports the player to the correct map and spawns the Spectator pawn, etc but doesn’t playback any of the replicated actors as it should.
Theoretically I think we should be able to run the following functions from game instance to record and playback a replay.
In our game instance cpp:
{
TArray<FString> Options;
Options.Add("ReplayStreamerOverride=InMemoryNetworkReplayStreaming");
StartRecordingReplay(NewName, NewName, Options);
}
void PlaybackKillcam()
{
TArray<FString> Options;
Options.Add("ReplayStreamerOverride=InMemoryNetworkReplayStreaming");
PlayReplay(ReplayURL, nullptr, Options);
}
In our build.cs:
DynamicallyLoadedModuleNames.AddRange(
new string[] {
"InMemoryNetworkReplayStreaming"
}
);
[1]: https://docs.unrealengine.com/en-US/Engine/Replay/Streamers
The documentation suggests that I should create a dynamic duplicated level and then destroy it after the replay ends. I’m not sure if this is something the engine does already through the replay system or if we need to implement that ourselves. Have you ever dealt with this before? Know how I might create a dynamically duplicated sublevel and properly tell the PlayReplay function to open it/playback from there?
I’m clutching at straws here.