public void TryConnect() { clientHandler.hostName = stringToEdit; clientHandler.port = Int32.Parse(port); if (clientHandler.isConnected()) { clientHandler.Disconnect(); } else { clientHandler.ConnectToServer(); //gameObject.SetActive(false); } }