From fb4074e77293d834289463bc528843192c8154d1 Mon Sep 17 00:00:00 2001 From: Vladimir de la Cruz Date: Tue, 21 Mar 2017 19:41:02 -0400 Subject: [PATCH] #5 Networked scene change --- Assets/Scripts/Utility/SceneSwitch.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scripts/Utility/SceneSwitch.cs b/Assets/Scripts/Utility/SceneSwitch.cs index 1dc6a84..72c3f75 100644 --- a/Assets/Scripts/Utility/SceneSwitch.cs +++ b/Assets/Scripts/Utility/SceneSwitch.cs @@ -47,7 +47,12 @@ private void OnTriggerStay(Collider other) } Cursor.visible = false; + + #if NETWORKING + UnityEngine.Networking.NetworkManager.singleton.ServerChangeScene(sceneName); + #else SceneManager.LoadScene(sceneName); + #endif } } } \ No newline at end of file