When is Replicated Data Ready?

Let´s say I am a Client joining a Session. When the Scene is Loaded, where in the flow is all the Actors Replicated data ready to be used? For Example: Can I be guarenteed to use the up-to-date Replicated data in the first BeginPlay on any Actor?

There is nothing like that as to an event that guarantees an actor has fully replicated. In PostNetInit (which fires before BeginPlay client-side) you generally receive POD types. Non-POD types, like a pointer to another actor are ready only when their NetGUID is resolved into a replicated actor on client, and that happens only when the OnRep tied to that pointer actor fires (that’s why it’s so important to tie such non-POD types to OnRep functions).

WizardCell is right, but I’d also like to point out that the order of operations of initialization can be a good indicator of what is ready and what isn’t to try and access variables or data off begin play or consider replication.

When loading a level, the flow it goes something like Game Instance (which should already be initialized on startup)-> Game Mode-> Game State->Player State->Player Controller-> and lastly → Player Character or Pawn(if any). You can put print strings on every begin play of everything important to get an idea of what order everything is happening in.

Agreed. For the order, I explain that here.

@WizardCell & @Humanasset : Thanks for the answers! Helped me in the right direction!

1 Like