| | 1 | | using DCL.ECSComponents; |
| | 2 | | using Google.Protobuf; |
| | 3 | |
|
| | 4 | | namespace DCLPlugins.ECS7.ECSComponents.Events.OnPointerDown.Serializer |
| | 5 | | { |
| | 6 | | public static class OnPointerDownSerializer |
| | 7 | | { |
| | 8 | | public static byte[] Serialize(PBOnPointerDown model) |
| | 9 | | { |
| 0 | 10 | | int size = model.CalculateSize(); |
| 0 | 11 | | byte[] buffer = new byte[size]; |
| 0 | 12 | | CodedOutputStream output = new CodedOutputStream(buffer); |
| 0 | 13 | | model.WriteTo(output); |
| 0 | 14 | | return buffer; |
| | 15 | | } |
| | 16 | |
|
| | 17 | | public static PBOnPointerDown Deserialize(object data) |
| | 18 | | { |
| 4 | 19 | | return PBOnPointerDown.Parser.ParseFrom((byte[])data); |
| | 20 | | } |
| | 21 | | } |
| | 22 | | } |