private void StartStation() { int port = 0; string IP = ""; bool b = false; string text = stationIP.text; Debug.Log(text); if (text.Contains(":")) { String[] data = stationIP.text.Split(':'); IP = data[0]; b = int.TryParse(data[1], out port); } if (b && ValidPort(port) && ValidateIP(IP)) { var cont = FindObjectOfType <CustomNetworkManager>(); cont.GetComponent <KcpTransport>().Port = (ushort)port; cont.networkAddress = IP; sc.PlayBite("bell"); //cont.StartClient(); loadingController.StartLoad(sc, "StationRoom", 2); } else { sc.PlayBite("error", .15f); } }