void Update() { if (Input.GetKeyDown(KeyCode.A)) { Mail_Get_DetailProto proto = new Mail_Get_DetailProto(); NetWorkSocket.Instance.SendMsg(proto.ToArray()); } }
void Update() { if (Input.GetKeyDown(KeyCode.A)) { TestProto proto = new TestProto(); proto.Id = 100; proto.Name = "测试协议"; proto.Price = 66.6f; proto.Type = 80; //发送 NetWorkSocket.Instance.SendMsg(proto.ToArray()); } if (Input.GetKeyDown(KeyCode.B)) { Mail_Get_DetailProto proto = new Mail_Get_DetailProto(); NetWorkSocket.Instance.SendMsg(proto.ToArray()); } }