You have an authority check before the “wait for pawn ready” validation. So I guess this code is running on the server? If so, this doesn’t make any sense lol. There is no replication or any network delay on server side.
IMO each actor should be responsible for waiting necessary values / initial replication on their own. What I did for my plugin was create a basic “wait initial replication” system. It looks something like this:
- In your actor’s BeginPlay for example, call your custom
WaitInitialReplicationfunction. -
WaitInitialReplicationfunction continuously callsIsInitialReplicationCompletevia a timer. -
IsInitialReplicationCompleteis an overridable function that returns either true or false. Actors can override this function to basically make a list validation checks for themselves. This is all happening locally! - When
IsInitialReplicationCompletereturns true, I call a customOnInitializedevent. - Now I can do any actor specific initalization in
OnInitialized.