Setting up proper replication for Parent/Child actor pointers?

I have four blueprints, BP_Parent, BP_Child1, BP_Child2 and BP_ChildPair.

The hierarchy looks like this:

BP_Parent
has many
BP_ChildPair
has one of each
BP_Child1
BP_Child2

When appropriate, the server spawns a BP_Parent through an RPC event. BeginPlay event is called random each time for my four blueprints. I have variables set to OnRep in my blueprints.

BP_Parent has an array of BP_ChildPairs. OnRep is called multiple times. The first time, the array has a size of X but the actor is null. After OnRep/Begin play, the array has a proper Actor.

My understanding is that each blueprint that is replicated needs to have Begin play event called to setup correctly (correct GUID etc).

So to make this work, in each of my blueprints, I have to listen for OnRep for said variables and then ask the parent (if found) to loop through it’s array of ChildPairs, and let each ChildPair check if it’s children Child1 and Child2 are valid.

This does not feel optimal. I have to juggle between 4 race conditions.

Is this intended?

Actually there is another race condition and that is I also have to listen for BeginPlay. So both OnRep for the variables and BeginPlay for said variables need to be taken in account.

So when I check if the children have been resolved (loop all children and check not null), this will happen for the owner, the X pairs and two children. Twice, for OnRep AND BeginPlay because of which order happens first. This sounds highly inefficient…