I was happy to find out that by adding a component to a child, I could automatically synchronize its transform with the parent entity.
I have a ghost entity parent, that spawns a ghost entity child, and on the server the child and the parent stay in sync. However, on clients, the parent attribute isn’t automatically replicated, so transforms aren’t synchoronized. To make my example complete, the parent is a unit, the child is a trigger associated with that unit.
What is the correct architectural approach here?
- Am I missing a way to have the Parent attribute be synchronized automatically?
- Should I use an RPC to establish the parent/child relationship on all clients?
- Should my child not be a ghost, and should I be using an RPC to inform the clients to spawn children, and then set the parent/child relationship individually?