Hey everyone,
When connecting a client to a server, is there an event/method that would tell me “Everything is ready Master, ask me anything you wish” ?
I am having a rough time with initialization when clients connect to the server.
For example the client crashes when i put this in the gamestate’s BeginPlay() function:
GetWorld()->GetFirstPlayerController()->PlayerState->PlayerId
Same thing when the PC asks its PlayerState->PlayerId in its BeginPlayingState() function.
I guess in both cases the gamestate is still not replicated when the client tries to access it.
So is there a PostGameStateReplication() method in which i can safely assume that every basic vital info has been replicated and is available on client side ?
What’s the good practice to get your PlayerID at initialization time ? I’m thinking to make an Init() function delayed by a timer, but that doesn’t smell too good.
Some overview of the life cycle of a client/server session would be great. If it’s already documented somewhere, i missed it, thanks for pointers^^
Cheers
Cedric