Version: 2018.4
LanguageEnglish
  • C#
Method group is Obsolete

NetworkManager.ServerChangeScene

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Obsolete The high level API classes are deprecated and will be removed in the future.

Declaration

public void ServerChangeScene(string newSceneName);

Parameters

newSceneName The name of the Scene to change to. The server will change Scene immediately, and a message will be sent to connected clients to ask them to change Scene also.

Description

This causes the server to switch Scenes and sets the networkSceneName.

Clients that connect to this server will automatically switch to this Scene. This is called automatically if onlineScene or offlineScene are set, but it can be called from user code to switch Scenes again while the game is in progress. This automatically sets clients to be not-ready. The clients must call ClientScene.Ready again to participate in the new Scene.