Creating players after loading

Hello!

So I've been working on a game, and I have a problem when trying to create the players.
I want the game to load a scene, and when the scene is loaded for all clients, I want to create the players.

This works fine in my test world with no problems. But once I change to the main world (which is kinda big), it doesnt work. Both of the clients load the scene, but neither of them have the player created.

I have tried several ways to check if the clients are ready. At the moment, I have a Coroutine, on the main client that checks the custom properties of each client to check if they are ready. And once they are, it sends the RPC_CreatePlayer.


I've been struggling to get this to work for a few weeks now. I would love it if anyone has any tips, or could help me with the code to get it to work.

Thanks in advance!

Answers

  • I'm not sure if you mean it but if.
    you change maps in the room probably the best solution is
    DontDestroyOnLoad (this.gameObject);
Sign In or Register to comment.