Skip to content

Commit

Permalink
fix: #651 GetSceneAt assumes default scene (#654)
Browse files Browse the repository at this point in the history
Changed to GetActiveScene
  • Loading branch information
uweeby authored and vis2k committed Mar 26, 2019
1 parent 8c93f31 commit 65eaba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Mirror/Runtime/NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public bool StartServer()
isNetworkActive = true;

// Only change scene if the requested online scene is not blank, and is not already loaded
string loadedSceneName = SceneManager.GetSceneAt(0).name;
string loadedSceneName = SceneManager.GetActiveScene().name;
if (!string.IsNullOrEmpty(onlineScene) && onlineScene != loadedSceneName && onlineScene != offlineScene)
{
ServerChangeScene(onlineScene);
Expand Down

0 comments on commit 65eaba1

Please sign in to comment.