public void StartLAN() { networkManager.StopMatchMaker(); networkManager.StartHost(); if (networkManager.IsClientConnected() && !ClientScene.ready) { ClientScene.Ready(networkManager.client.connection); if (ClientScene.localPlayers.Count == 0) { ClientScene.AddPlayer((short)0); } } }
private void JoinMatch() { MyNetworkManager networkManager = FindObjectOfType <MyNetworkManager>(); networkManager.JoinMatch(match); if (networkManager.IsClientConnected() && !ClientScene.ready) { ClientScene.Ready(networkManager.client.connection); if (ClientScene.localPlayers.Count == 0) { ClientScene.AddPlayer((short)0); } } manager.ActivePublicLobby(); }