private void OnConnectSuccess() { _client.QueryStatus(OnStatusChange); _reliableClient = new ReliableEndpoint(); _reliableClient.ReceiveCallback += OnReliableReceiveCallback; _reliableClient.TransmitCallback += OnReliableTransmitCallback; _client.AddPayloadListener(OnMessageReceive); }
IEnumerator updateStatus() { while (true) { client.QueryStatus((status) => { }); yield return new WaitForSeconds(0.1f); } }
IEnumerator updateStatus() { while (true) { client.QueryStatus((status) => { StatusText.text = status.ToString(); }); yield return(new WaitForSeconds(0.1f)); } }