Ejemplo n.º 1
0
 private void LoadNetwork()
 {
     if (GameObject.Find("MultiplayerObject") != null)
     {
         networkManager = managerScene.NetworkManager;
     }
     else
     {
         Solo = true;
     }
 }
Ejemplo n.º 2
0
 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);
 }