public void startClientButton() { networkLobbyManager.StartClient(); string ipText = ipTextField.GetComponent <Text>().text; if (ipText == "") { networkLobbyManager.networkAddress = placehold; } else { networkLobbyManager.networkAddress = ipText; } // networkLobbyManager.showLobbyGUI = true; networkInfo.SetActive(true); networkHUD.SetActive(false); lobbyGUI.SetActive(true); gameIsActive = true; }
// Use this for initialization void Start () { lobbyManager = GameObject.Find("Lobby").GetComponent<MyNetworkLobbyManager>(); MyNetworkLobbyManager.networkLobbyManagerInstance = lobbyManager; lobbyManager.showLobbyGUI = true; lobbyPlayerList = GameObject.Find("LobbyPlayerList"); menu = transform.FindChild("LobbyUI").GetComponent<LobbyMenu>(); startButton = GameObject.Find("StartButton"); lobbyManager.showLobbyUI = true; if (ServerInfo.hosting) { lobbyManager.StartHost(); } else { lobbyManager.networkAddress = ServerInfo.ip; client = lobbyManager.StartClient(); } }
// Use this for initialization void Start() { lobbyManager = GameObject.Find("Lobby").GetComponent <MyNetworkLobbyManager>(); MyNetworkLobbyManager.networkLobbyManagerInstance = lobbyManager; lobbyManager.showLobbyGUI = true; lobbyPlayerList = GameObject.Find("LobbyPlayerList"); menu = transform.FindChild("LobbyUI").GetComponent <LobbyMenu>(); startButton = GameObject.Find("StartButton"); lobbyManager.showLobbyUI = true; if (ServerInfo.hosting) { lobbyManager.StartHost(); } else { lobbyManager.networkAddress = ServerInfo.ip; client = lobbyManager.StartClient(); } }