mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
Trying to use ServerChangeScene()
This commit is contained in:
parent
0597d08b8b
commit
ee4afecf3a
2 changed files with 6 additions and 1 deletions
|
@ -152,6 +152,11 @@ namespace SanAndreasUnity.Net
|
|||
NetworkServer.Spawn(go);
|
||||
}
|
||||
|
||||
public static void ChangeScene(string newScene)
|
||||
{
|
||||
NetworkManager.singleton.ServerChangeScene(newScene);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -67,7 +67,7 @@ namespace SanAndreasUnity.UI
|
|||
else
|
||||
NetManager.StartHost(port);
|
||||
|
||||
UnityEngine.SceneManagement.SceneManager.LoadScene(scene);
|
||||
NetManager.ChangeScene(scene);
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue