How to Sync Scene Objects

Options
I'm trying to sync objects that are already in the scene, for players joining later. Objects such as breakable windows, elevator states, door states etc. Is this possible without having to instantiate them first by the host? If so how?

Comments

  • JD11337
    Options
    I found the solution, simply use a RPC call with RpcTarget.AllBufferedViaServer and it should work
  • Tobias
    Options
    Buffered RPCs may work here but will add to an ever growing list of event that need to be received on join.
    An alternative is to combine some of those states and set them as room properties. This is probably leaner for the joining players.
  • JD11337
    Options
    I was also thinking about events, but I have a feeling they're not really supposed to be used like that. Especially because I have multiple scenes with different interactable items.

    About the ever-growing list, I'm removing the objects buffered RPCs before calling the new one, as most my objects are binary (broken or not, elevator is either up or down) this works perfectly.