public bool IsConnected() { if (tcp == null) return false; return tcp.Connected; }
// Update is called once per frame void Update() { if (network.IsConnected()) { connectionText.text = "Connected"; } else { connectionText.text = "Disconnected"; } }