Strange DemoReplay Issues
So, I've been trying to get basic replay functionality working for the past couple of hours, but can't seem to go forward with this issue.
I loosely followed the tutorial at https://wiki.unrealengine.com/Replay_System_Tutorial in order to implement some basic replay functionality. What I've got working is this:
Now, here are the issues: If I use 'demorec', 'demostop', 'demoplay', the replay puts me into the standard spectator pawn and executes fine, for the most part. However, my multicast RPCs don't seem to get replicated in the replay (though they work in multiplayer on both the host and the client). I tried messing around with them, setting them to server/client only, toggling reliable, etc. but to no success. This occurs in both the editor and the standalone version.
If I use the cpp version, I get something different. Starting & stopping the recording works fine, but when calling UGameInstance::PlayReplay(name), it puts the camera to the world origin & remains immovable (suggesting the spectator pawn/controller was not even initialized). Again, this occurs on both the editor and standalone. When doing this in the editor, it also shows no movement or any of the replicated actors being instantiated (when ejecting the camera and flying around).
This is the relevant C++ code:
All of these are called from within the player pawn (important?) upon keypress (1 for start rec., 2 for stop rec., 3 for play). Again, PlayReplay does not work in this case. (why?)
TL;DR: So basically, there are two issues right now.
Any help would be greatly appreciated!
This has successfully been resolved using the workaround outlined here: https://answers.unrealengine.com/questions/546577/multicast-not-called-in-replays-1.html
Note that this may make it impossible to make a real-time multiplayer game (which is fine for my situation), since the actor will now always access the DemoNetDriver, which is solely for replays as I understand.
It would be great to get some clarification from a dev though, as to why DemoNet behaves the way it does under certain circumstances.
answered Mar 16 '18 at 10:44 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here