1. class DebugConnection : NetworkConnection
    2. {
    3. {
    4. StringBuilder msg = new StringBuilder();
    5. for (int i = 0; i < numBytes; i++)
    6. {
    7. var s = String.Format("{0:X2}", bytes[i]);
    8. if (i > 50) break;
    9. }
    10. UnityEngine.Debug.Log("TransportRecieve h:" + hostId + " con:" + connectionId + " bytes:" + numBytes + " " + msg);
    11. HandleBytes(bytes, numBytes, channelId);
    12. }
    13. {
    14. for (int i = 0; i < numBytes; i++)
    15. {
    16. var s = String.Format("{0:X2}", bytes[i]);
    17. msg.Append(s);
    18. if (i > 50) break;
    19. }
    20. UnityEngine.Debug.Log("TransportSend h:" + hostId + " con:" + connectionId + " bytes:" + numBytes + " " + msg);
    21. return NetworkTransport.Send(hostId, connectionId, channelId, bytes, numBytes, out error);
    22. }