private void ConnectToServer(string client_secret) { Misc.PrintDebugLine("StartMenu", "Login", "Login accepted, attempting to login on game server."); DontDestroyOnLoad(GameObject.Find("Game Manager")); Client.instance.loginHash = client_secret; Client.instance.ConnectToServer(client_secret); if (Client.instance.tcp.socket.Connected) { SceneManager.LoadScene(1); GameManager.instance.gameObject.AddComponent <EntityHandler>(); EntityHandler.Load(); } }
public void LoadWorld() { SceneLoadStack = new List <AsyncOperation>(); foreach (int scene_id in Enumerable.Range(1, SceneManager.sceneCountInBuildSettings - 1)) { SceneLoadStack.Add(SceneManager.LoadSceneAsync(scene_id, LoadSceneMode.Additive)); } if (ConfigurationPathsValid()) { LoadPrefabs(); ActionHandler.Load(); DataHandler.Load(); EntityHandler.Load(); } }