I’m trying to set up an instant replay system using DemoNetDriver, and when I use console commands in-game it works fine, recording and playing it with the commands line ‘demorec ReplayName’ to record, ‘demostop’ to stop recording and ‘demoplay ReplayName’ to play, but when I do it through C++ the camera resets and movement input is disabled. This is my code:
//Start recording replay
UGameInstance* gi = Cast<UGameInstance>(GetWorld()->GetGameInstance());
gi->StartRecordingReplay("replaytest","test");
//Stops recording and plays it
UGameInstance* gi = Cast<UGameInstance>(GetWorld()->GetGameInstance());
gi->StopRecordingReplay();
gi->PlayReplay("replaytest");
What is going wrong and what is the correct way to make an instant replay system?