public static MessageWithCustomWriter Read(this NetworkReader reader) { ReaderCalled++; MessageWithCustomWriter value = default; value.type = (int)reader.Read(4); value.value = reader.Read(12) / 100f; return(value); }
public static void Write(this NetworkWriter writer, MessageWithCustomWriter value) { WriterCalled++; writer.Write((ulong)value.type, 4); writer.Write((ulong)(value.value * 100), 12); }