How do you work around the NetCode limitations?

A lot of the tools available in vanilla ECS isn’t available in NetCode and I’d like to know how do you write your gameplay logic around it.

  1. Adding/removing components to Ghosts at runtime isn’t supported
  2. Changing the Transform Hierarchy on a Ghost isn’t supported (add/remove child, detach transform)
  3. Enabling/Disabling objects isn’t supported (similar to #1, since it’s the Disabled component)
  4. Entity references randomly stop working (kind of, not sure if it’s my implementation issue), they became Entity.Null on some Clients.
  5. Spawning Client-only objects into Ghost transform hierarchy seems to break everything

I can’t figure out how to do many things with this setup, especially transform changes and it’s very frustrating, any tips?

1 and 3 are things I don’t really do in any project regardless of netcode and are mostly handled by enable components these days, which netcode supports. However, I would have expected 3 to work fine on server tbh.

Side note there is api now that netcode that does let you change your ghost archetype at runtime, but needs to be run on both client and server.

4 References only work if the entity already exists before spawning. It’s very unreliable outside of ghosts groups. I would like this to work though

I’d be interested to learn more about this limitation. Does this mean entity references aren’t really usable when dealing with ghosts despawned by relevancy, etc?