Earliest Point to Reliably Acquire Data from Reliable RPCs

Hello. Are there any events that occur before a player is spawned that wait for RPC calls to be completed before firing?

My specific case needs to use data sent from my subclass of the client’s PlayerController in the my GameMode’s ChoosePlayerStart_implementation() function, based on data from the client’s GameInstance. I guess this question can be more general, though, for other use cases.

Is there some RPC handshake point that we can guarantee all reliable RPCs (particularly Server and Client RPCs on PlayerControllers) will be done by? Or are we supposed to let UE4 do its thing, which will automatically spawn the player, then despawn what UE4 created and respawn the player with the appropriate data when we finish doing our thing?


Apparently no such time exists. In fact, BeginPlay() on APlayerController and its subclasses could even occur before RPCs are transmitted. Call them on APlayerController::PostLogin() (or later) and respawn the player pawn if spawning requires server knowledge.

I think in your scenario you would need to send the GameInstance data when the client logs on to the server. This way you can spawn based on that data.