It seems as though calling a multicast RPC during BeginPlay on the server will cause the new actor to finish spawning on the client before applying any initial replicated data, such as the actor's Role.
When first connecting, the pawn's role will be correct during its BeginPlay on the client, perhaps due to the initial BeginPlay being dispatched from AGameStateBase::OnRep_ReplicatedHasBegunPlay on the client.
The reliability of the multicast did not appear to affect the behavior, and the issue does not seem to occur when calling a client RPC.
Create a pawn where the server calls a multicast RPC (either reliable or unreliable) from its BeginPlay. Have the server then destroy and restart a player's pawn.
Expected: the client that owns the pawn will call BeginPlay with a role of autonomous proxy
Actual: the pawn's role during BeginPlay will be simulated proxy
See linked UDN for more info.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-155934 in the post.
|Component||UE - Networking|
|Created||Jun 6, 2022|
|Updated||Sep 28, 2022|