Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved How to Synchronize Ghost Structural Changes?

Discussion in 'DOTS Dev Blitz Day 2022 - Q&A' started by Kmsxkuse, Dec 8, 2022.

  1. Kmsxkuse


    Feb 15, 2019
    As mentioned in an earlier question, structural changes to ghosts are not replicated to clients. Should I be using RPCs from server to client to trigger relevant structural change systems?
  2. NikiWalker


    Unity Technologies

    May 18, 2021
    It's best practice to entirely avoid structural changes of Ghosts. Prefer to make the components `IEnableableComponents`, and toggle those, to get the same kind of behaviour.

    RPCs should not be used for this kind of gameplay logic, because:
    • They cannot be predicted.
    • They do not replicate state to new clients (e.g. Using an RPC to open a chest will not be replicated to any new joiners).
    • They do not work with ghost subsystems (like importance and relevancy).
    Kmsxkuse likes this.