Forcing Array Replication

Hello
I’ve got the hierarchy described below:

Pawn-[hasA]->Component-[hasA]->Array of Actors

Array of actors in component is replicated. Replication works fine, but the first time replication has valid values is after performing any action with the Pawn ( like moving ). I’d like to force replication of Array over all clients.
How to do that ?

You can either set the array to something else (MyArray = SomeOtherArray) or use an RPC and use the array as a parameter, then set it on the client side. There’s probably a method you can override to force the array to update, but I’m not sure entirely what it’d be.

It sounds like something else is probably going wrong, so you might want to figure it out. But you can probably band-aid over the problem for now by doing:

MyActor->ForceNetUpdate();

on the server/authority.

Yes, it was something else. When Component Spawns Actor, You have to make sure to set proper Owner by calling SetOwner. Without proper Owner property won’t be consider to be replicated

Thank you! This was driving me nuts.