private void LoadNetwork() { if (GameObject.Find("MultiplayerObject") != null) { networkManager = managerScene.NetworkManager; } else { Solo = true; } }
public IEnumerator SetUpNetworkManager() { if (isServer) { Manager = gameObject.AddComponent <StrategyServerManager>(); } else { Manager = gameObject.AddComponent <StrategyClientManager>(); } Manager.Address = Address; Manager.Port = Port; Manager.Connect(); managerScene.NetworkManager = Manager; Manager.IsServer = isServer; if (!isServer) { yield return(new WaitForConnected((StrategyClientManager)Manager)); } managerScene.LoadScene("StrategyGame", LoadSceneMode.Additive); }