Trying to use ServerChangeScene()

This commit is contained in:
in0finite 2019-04-24 20:46:34 +02:00
parent 0597d08b8b
commit ee4afecf3a
2 changed files with 6 additions and 1 deletions

View file

@ -152,6 +152,11 @@ namespace SanAndreasUnity.Net
NetworkServer.Spawn(go);
}
public static void ChangeScene(string newScene)
{
NetworkManager.singleton.ServerChangeScene(newScene);
}
}
}

View file

@ -67,7 +67,7 @@ namespace SanAndreasUnity.UI
else
NetManager.StartHost(port);
UnityEngine.SceneManagement.SceneManager.LoadScene(scene);
NetManager.ChangeScene(scene);
}
catch (System.Exception ex)
{