respawn objects after loading scene

This commit is contained in:
vis2k 2019-12-31 15:57:25 +01:00
parent 563f61c915
commit ea87561b52

View File

@ -753,6 +753,10 @@ public virtual void ServerChangeScene(string newSceneName)
startPositionIndex = 0; startPositionIndex = 0;
startPositions.Clear(); startPositions.Clear();
// always need to respawn server objects after changing scene.
// previously this was done in OnSceneLoaded.
NetworkServer.SpawnObjects();
} }
internal void ClientChangeScene(string newSceneName, SceneOperation sceneOperation = SceneOperation.Normal, bool customHandling = false) internal void ClientChangeScene(string newSceneName, SceneOperation sceneOperation = SceneOperation.Normal, bool customHandling = false)