Home Forums Support [Help] Custom Class and Coding Reply To: [Help] Custom Class and Coding

#3658
Anonymous
Inactive

I think this is the same as what tricked me in the first case. Turned out i needed to define which properties were serialized and in which order before the object could be send/recieved.
Im quite unfamiliar with Protobuf though, so only using [ProtoContract] might be sufficient but i havent tested this yet.

Like this:

    [ProtoContract]
    public class LoginPacket
    {
        [ProtoMember(1)]
        public string Username { get; set; }
        [ProtoMember(2)]
        public string Password { get; set; }
    }
  • This reply was modified 7 years, 5 months ago by .
  • This reply was modified 7 years, 5 months ago by .