4.11 P4 Spawned Actors not Replicating
For some reason, I haven't found this issue by searching for it, so I'm hoping it is just me.
To put it simply, if I place an actor in a level it will show up on the clients, but, if spawned, nothing I do will get it to spawn/replicate. I'm testing with an ultra basic Pawn class.
I've set "Replicates", "Net Load on Client", and "Replicates Movement" (defaults), but nothing I Spawn on the Server ends up on my clients.
As a side note, the same is happening for variables, as they refuse to replicate even on actors placed directly in the level. I've tested this by setting an Int to replicate on the same Pawn and I increment the Int on the server (works on the server), but the variable never changes on the actor on the clients.
As another side note, I'm getting a GameMode on the server and all clients, which the documentation says should only exist on the Server.
I'm really hoping this is something that can be fixed, because I simply can't make a network multiplayer game at this point.
asked Feb 02 '16 at 08:40 PM in Bug Reports
Thanks for the thorough investigation! Definitely helped narrow this down!
So, first thing, I saw the same problem with timers not stopping on the Server when pausing the simulation with players set higher than 1. I was able to reproduce that in a new project: looks like the Client pauses just fine, but for some reason the Server does not. This doesn't appear to affect actually pausing a game in a packaged game, but is rather simply an editor bug. I've created a report for that (UE-26471) and I'll post here when I see any update on it.
Second, the reason you're seeing a second GameMode and a new Player Controller is because the Client is being disconnected from the Server, thus sending it to its own game (thus a new GameMode and PC). The GameInstance should be the only thing remains when the Client is disconnected (maybe the GameState as well). This would also explain any replication issues after this point: nothing is replicated because the connection doesn't exist.
What's causing the disconnect appears to be the Component Replicates setting on your Actor Components. As you mentioned, disabling those stops this problem. I'm guessing this is because it's actually being set twice: in the component's defaults, and again once when you spawn the component. I'm going to test that scenario in a new project and get back to you with the results.
answered Feb 04 '16 at 06:53 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here