Scene Change

Ok so I have a server and Client each with 2 scenes. For this we will stay SsceneA SsceneB CsceneA CsceneB.
the game starts with the server playing SsceneA and client playing CsceneA
at a certain point I want the server to play SsceneB and client play CsceneB
i tried using
NetworkManager.singleton.ServerChangeScene (“SsceneB”);
but this changes the client scene as well as the Server scene.
is there a way just to change the server scene or just to change the client scene?

I believe UNET automatically assumes that both the host and the client are on the same scene so NetworkManager.singleton.ServerChangeScene will not work for you.

Instead I think you will have to change scenes manually using local SceneManager. You can then send a [Command] or MessageBase to the client telling them to change to CsceneB.

If you do this all networked UNET objects must be spawned (not scene objects!). Scene objects will only exist on the server OR the client since the server and client are on different scenes. But if you spawn the object then it can exist on both server AND client.

1 Like