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.
  2. Dismiss Notice

Multiplayer: How to sync created entity without GhostComponent

Discussion in 'NetCode for ECS' started by Occuros, Jul 30, 2020.

  1. Occuros

    Occuros

    Joined:
    Sep 4, 2018
    Posts:
    284
    In the current multiplayer examples, all newly created entities on the client & server have a GhostAuthoring component on the prefab.

    How can the creation of a new entity (on the server) be synchronized without having a prefab with a ghost component?
     
  2. Kelevra

    Kelevra

    Joined:
    Dec 27, 2012
    Posts:
    87
    Just send a custom RPC to the client with the required information.
     
  3. Occuros

    Occuros

    Joined:
    Sep 4, 2018
    Posts:
    284
    That could work, but is there a way to sync RPC calls to a specific tick, so the action happens on the same simulation step on all clients?
     
  4. Kelevra

    Kelevra

    Joined:
    Dec 27, 2012
    Posts:
    87
    You can write tick to RPC data and check it on the client-side.