0
\$\begingroup\$

I have a running server that can change maps. When a client joins the server, it automatically loads the scene because the server uses ServerChangeScene () to change the scene.

The problem is that the client does spawn the objects on the server, but it spawns them on the first scene it loads into. How can I make it spawn the objects on the actual scene it loads into?

\$\endgroup\$
0
\$\begingroup\$

So I fixed my own problem. The reason the server does not spawn the players for the other clients is that the objects are spawned on the first scene instead of the actual scene the client needs to load. The solution to my problem was to make sure the clients are set unready before loading the new scene, and then set them ready once they load the new server. Use methods like NetworkServer.SetAllClientsNotReady() and ClientScene.Ready()

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.