Memory Streamer DemoNetDriver KillCam or instant replay

Hello,

I am trying to implement a killcam or instant replay system in a multiplayer sports game. I am trying to build a system that will allow goals to be reviewed as soon as they have been achieved.
there is a system called Memory Streamer in the Unreal Engine documentation on the DemoNetDriver which seems suitable for this purpose.

It seems that this system allows the player to save a replay in his cash memory and then play it in a SubLevel while the game continues.
This system seems very interesting to me, however, documentation about it is very rare on the internet.

I found 2 posts related to this topic:

As well as a video that shows how to create a SubLevel:

But I don’t understand how to implement Memory Streamer system. Does anyone have the generosity to help me? Did you find some documentation that could help me (videos, doc unreal, channel discord or whatever) if not just an explanation here?

Thank you very much to those who will take the time to answer me.

Kind regards.

CPP_MultiplayerGameInstanceV2.h

#pragma once

#include "CoreMinimal.h"
#include "Engine/DemoNetDriver.h"
#include "Engine/GameInstance.h"
#include "CPP_MultiplayerGameInstanceV2.generated.h"

/**
 * 
 */
UCLASS()
class TOFSTYLE_API UCPP_MultiplayerGameInstanceV2 : public UGameInstance
{
	GENERATED_BODY()

public:
	
	UCPP_MultiplayerGameInstanceV2();

	UPROPERTY(EditDefaultsOnly, Category = "Replays")
	FString RecordingName;
	
	UPROPERTY(EditDefaultsOnly, Category = "Replays")
	FString FriendlyRecordingName;

	UPROPERTY(EditDefaultsOnly, Category = "Replays")
	FString ReplayURL;

	UFUNCTION(BlueprintCallable, Category = "Replays")
	void StartRecording();

	UFUNCTION(BlueprintCallable, Category = "Replays")
	void StopRecording();

	UFUNCTION(BlueprintCallable, Category = "Replays")
	void StartReplay();
};

CPP_MultiplayerGameInstanceV2.cpp

#include "CPP_MultiplayerGameInstanceV2.h"

UCPP_MultiplayerGameInstanceV2::UCPP_MultiplayerGameInstanceV2()
{
	RecordingName = "MyReplay";
	FriendlyRecordingName = "My Replay";
}


void UCPP_MultiplayerGameInstanceV2::StartRecording()
{

	UE_LOG(LogTemp, Warning, TEXT("Start Recording Replay"))

	TArray<FString> Options;
	Options.Add("ReplayStreamerOverride=InMemoryNetworkReplayStreaming");
	StartRecordingReplay(RecordingName, FriendlyRecordingName, Options);
}

void UCPP_MultiplayerGameInstanceV2::StopRecording()
{
	UE_LOG(LogTemp, Warning, TEXT("Stop Recording KillCam Replay"))

	TArray<FString> Options;
	Options.Add("ReplayStreamerOverride=InMemoryNetworkReplayStreaming");
	StopRecordingReplay();
}

void UCPP_MultiplayerGameInstanceV2::StartReplay()
{
	UE_LOG(LogTemp, Warning, TEXT("Play Killcam Replay"))

	TArray<FString> Options;
	Options.Add("ReplayStreamerOverride=InMemoryNetworkReplayStreaming");
	PlayReplay(ReplayURL, nullptr, Options);
}

My build.cs

using UnrealBuildTool;

public class TofStyle : ModuleRules
{
	public TofStyle(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
	
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "OnlineSubsystemUtils", "Steamworks", "Networking", "PhysX", "APEX" });

		DynamicallyLoadedModuleNames.AddRange(new string[] { "OnlineSubsystemSteam", "InMemoryNetworkReplayStreaming" });

		PrivateDependencyModuleNames.AddRange(new string[] {  });

        // Uncomment if you are using Slate UI
        // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

        // Uncomment if you are using online features
        PrivateDependencyModuleNames.Add("OnlineSubsystem");

        // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
    }
}

Error Logs:

> LogTemp: Warning: Start Recording
> Replay LogNetVersion: SpaceSoccer
> 1.0.0.0, NetCL: 13144385, EngineNetVer: 14, GameNetVer: 0
> (Checksum: 154621645) LogNet:
> ReplicationDriverClass is null! Not
> using ReplicationDriver. LogNetCore:
> DDoS detection status: detection
> enabled: 0 analytics enabled: 0
> LogNet: AddClientConnection: Added
> client connection: [UNetConnection]
> RemoteAddr: UDemoNetConnection, Name:
> DemoNetConnection_0, Driver:
> DemoNetDriver DemoNetDriver_0,
> IsServer: YES, PC: NULL, Owner: NULL,
> UniqueId: INVALID LogDemo: Num Network
> Actors: 16 LogBlueprintUserMessages:
> [ThirdPersonCharacter_C_0] Server:
> Recording LogTemp: Warning: Play
> Killcam Replay LogDemo: StopDemo: Demo
> MyReplay stopped at frame 493 LogNet:
> UNetConnection::Close:
> [UNetConnection] RemoteAddr:
> UDemoNetConnection, Name:
> DemoNetConnection_0, Driver:
> DemoNetDriver DemoNetDriver_0,
> IsServer: YES, PC: PlayerController_0,
> Owner: PlayerController_0, UniqueId:
> INVALID, Channels: 14, Time:
> 2021.02.14-11.55.36 LogNet: DestroyNamedNetDriver DemoNetDriver_0
> [DemoNetDriver] LogDemo: PlayReplay:
> Attempting to play demo 
> **LogDemo: Warning: UDemoNetConnection::ReplayStreamingReady:
> Failed. DemoNotFound**
> **LogDemo: Warning: Demo playback failure: 'DemoNotFound'**   LogDemo:
> StopDemo: Demo  stopped at frame 0
> LogDemo: Warning: Demo playback
> failed:  LogDemo: StopDemo: No demo is
> playing LogNet: DestroyNamedNetDriver
> DemoNetDriver_1 [DemoNetDriver]
> LogTemp: Warning: Start Recording
> Replay LogNet: ReplicationDriverClass
> is null! Not using ReplicationDriver.
> LogNetCore: DDoS detection status:
> detection enabled: 0 analytics
> enabled: 0 LogNet:
> AddClientConnection: Added client
> connection: [UNetConnection]
> RemoteAddr: UDemoNetConnection, Name:
> DemoNetConnection_2, Driver:
> DemoNetDriver DemoNetDriver_2,
> IsServer: YES, PC: NULL, Owner: NULL,
> UniqueId: INVALID LogDemo: Num Network
> Actors: 17 LogBlueprintUserMessages:
> [ThirdPersonCharacter_C_0] Server:
> Recording LogTemp: Warning: Stop
> Recording KillCam Replay LogDemo:
> StopDemo: Demo MyReplay stopped at
> frame 232 LogNet:
> UNetConnection::Close:
> [UNetConnection] RemoteAddr:
> UDemoNetConnection, Name:
> DemoNetConnection_2, Driver:
> DemoNetDriver DemoNetDriver_2,
> IsServer: YES, PC: PlayerController_1,
> Owner: PlayerController_1, UniqueId:
> INVALID, Channels: 14, Time:
> 2021.02.14-11.55.43 LogNet: DestroyNamedNetDriver DemoNetDriver_2
> [DemoNetDriver]
> LogBlueprintUserMessages:
> [ThirdPersonCharacter_C_0] Server:
> Stop Recording LogTemp: Warning: Play
> Killcam Replay LogDemo: PlayReplay:
> Attempting to play demo  LogDemo:
> Warning:
> UDemoNetConnection::ReplayStreamingReady:
> Failed. DemoNotFound LogDemo: Warning:
> Demo playback failure: 'DemoNotFound'
> LogDemo: StopDemo: Demo  stopped at
> frame 0 LogDemo: Warning: Demo
> playback failed:  LogDemo: StopDemo:
> No demo is playing LogNet:
> DestroyNamedNetDriver DemoNetDriver_3
> [DemoNetDriver]

It is a shame that there isn’t much info on this. I have source from the Paragon kill cam system. I have been trying to dissect it . However, my C++ knowledge is limited. Did you ever figure this out? Any help would be appreciated. So far I basically have what you have, which I learned here. It works when using local streamer, but not when memory streamer. I know this is something a lot of developers could use and would if the documentation was better. Any chance Epic plans to improve the docs for this?