Hello!
The documentation says:
But I don’t understand the real meaning, what needs to be stripped off from the ghost at runtime?
Hello!
The documentation says:
But I don’t understand the real meaning, what needs to be stripped off from the ghost at runtime?
The client and server uses slightly different version of the prefabs for ghosts. The client has a snapshot history buffer attached to the ghost which the server doesn’t have, the server always has a PredictedGhostComponent which the client only has it the ghost is predicted, components are removed from one or the other based on the PrefabType in the GhostComponent attribute. There might be something more I’m forgetting.
When you build a client only or server only version of the subscene data we remove those component at conversion time - when building your data. If the subscene should work on both the client and the server we cannot do that. What we do instead if flag the prefabs and pre-spawned ghosts as needing to remove those component at runtime based on if the world is a client or server world. We also store lists in a blob asset to tell the runtime which component to remove.