Description

Related to [Link Removed], where calling a multicast RPC in BeginPlay results in the character being spawned on the client with the incorrect role/initial property data.
One thing to note: this does not seem to occur for other dynamically spawned actors. In attempting to reproduce the bug, this only occurred when calling a reliable multicast RPC from the BeginPlay of a character actor owned by the client. If a replicated actor is spawned and calls a reliable multicast RPC from its BeginPlay, the client will receive an open bunch for the new actor and then a separate bunch containing the RPC event, so BeginPlay is called before the RPC.

Steps to Reproduce

Create a character actor where the server calls a reliable multicast RPC from its BeginPlay. Have the server then destroy and restart a player's pawn.
Expected: the client will receive the open bunch for the new character, spawning the actor and calling BeginPlay before processing any RPCs called on it
Actual: the character's open bunch will also contain the RPC, resulting in the RPC being processed before AActor::PostNetInit (called at the end of UActorChannel::ProcessBunch) calls BeginPlay on the character

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-165405 in the post.

1
Login to Vote

Backlogged
ComponentUE - Networking
Affects Versions5.1
Target Fix5.5
CreatedSep 28, 2022
UpdatedFeb 29, 2024