How to sync up created and destroyed gameobjects for late joining players

Options
I'm looking to create a networked scene where late players can join and sync up to the current world state. That would be tracking any previously instantiated game objects, updating their transform/rotation/scale, and any extra stats.

I'm looking for an outline of the steps rather than explicit code.

I've made one attempt at this so far and the best I got was for the masterclient to boot and run fine, and any joining client to join, sync fine with other players, but all instantiated gameobjects would get generated at the root of the scene (not under the correct parent), resulting in them updating their transform based off the world space, rather than parent space. They wouldn't have any mesh either, the only way I could detect them was to add in debug.drawline to show their current transform in the world.

Thanks for the help.

Best Answer

Answers

  • roskelld
    Options
    I suppose to ask a direct question on this:
    If I instantiate a gameobject before a player joins, should that client also call the instantiate function to make it appear for them, or is there another procedure they should do?