Child actor problem replicate

Hello everyone. I have a problem in my games since I migrated from version 4.21 to version 5.3. In version 4.21 I had a replica Actor which contains a replica child actor. It’s a client server game. Everything worked perfectly. Once migrated to version 5.3 it does not work correctly. So I created a new test project to find the problem, the project is composed like this:

an actor named BP-actorA replicate which contains a simple cube without any code
an actor named BP-actorB replicate which simply contains a child actor component which is BP-actorA.
Actor BP-actorB is placed in the world

Result :
-On the server side, everything works.
-on the client side we see the child actor BP-actorA replicated twice. The 1st is at the correct position and the 2nd is at the relative position 0,0,0.

If I make the actor BP-actorA non-replicating, the problem disappears. I redid this test in version 4.21 and it works perfectly. My problem is thishttps://issues.unrealengine.com/issue/UE-200690
But apparently it still hasn’t been resolved.

The child actor absolutely must be replicated in my project. Does anyone have a solution? THANKS

On the servers copy you can use ADD Component on Begin Play to add the child.

Begin Play: Switch has Authority (Auth) -> Add component (your actor).

IF the component is set to replicate it will be added (replicated over) to all connected clients. There shouldn’t be an issue with duplication.

thank you Rev0verDrive for your response. I didn’t specify but the actor is created with construction script. The main actor is an elevator and the child are the doors. I have to create it before the game :frowning:

what actor (A/B) is created with construction script?
Which construction script?

actor B is created with construction script and adds child actor A during construction script

Create B.
In B, Begin Play spawn Actor A, create a “Reference var” for A, then configure.

Essentially you’re moving B’s construction to a begin play function.


What Actor’s construction script is creating B?

Yes I could build B in the beginplay but I could not correctly place the elevator in the world because it is a configurable accelerator (number of floors, height of the floors, position of each door…). What I don’t understand is that in version 4.21 there was no this problem :’( . What do you mean by “What Actor’s construction script is creating B?”? Thank you for your help :slight_smile:

You could do all that, get door locations etc.

Every ActorA in the B class has a reference which is used to position them. You can create empty vars (door obj ref) for each potential floor. On spawning of the doors set their var, and position them.


The overall issue is a core code problem that Epic needs to fix in a future build. You can either rework your elevator system or wait on them.

Personally I’d refactor the code.

Okay I will try your solution. thank you for helping me:)