public void Connect() { string sIp = serverIp.text; int sPort = -1; int myPort = -1; if (!int.TryParse(serverPort.text, out sPort)) { Debug.Log("Failed server port parse"); return; } if (!int.TryParse(clientPort.text, out myPort)) { Debug.Log("Failed client port parse"); return; } Debug.Log("Connection start"); connection.Connect(sIp, myPort, sPort, Hide); }