Host and client issue

Options
Hi i have a issue with my game, the host spawn the random map and after the new player who has connected doesn't have the map on his client any ideas ? I think the issue is that the masterclient spawn the gameobject but it's not sync with the client which don't have the gameobjects on his client.

https://ibb.co/kQSh5K
https://ibb.co/iKuZKe
https://ibb.co/nRu1ze

Comments

  • Hi @Willk24,

    if you have a randomly generated map you would have to synchronize it across all clients, otherwise each client will generate his own map, which differs from the others' levels.

    The best way to do this, is to procedurally generate the level by using a seed, which can be easily synchronized across all clients. Having this seed, each client can generate the same level on their end. An example for this can be found in the PUN 2 package. If you have random maps which just have objects placed randomly, each client would have to instantiate the objects at the same position.
  • Willk24
    Options
    Thank i will try !