Austin Schuh | 2dd86a9 | 2022-09-14 21:19:23 -0700 | [diff] [blame] | 1 | // <auto-generated> |
| 2 | // automatically generated by the FlatBuffers compiler, do not modify |
| 3 | // </auto-generated> |
| 4 | |
| 5 | namespace MyGame.Example |
| 6 | { |
| 7 | |
| 8 | using global::System; |
| 9 | using global::System.Collections.Generic; |
| 10 | using global::Google.FlatBuffers; |
| 11 | |
| 12 | public struct StructOfStructsOfStructs : IFlatbufferObject |
| 13 | { |
| 14 | private Struct __p; |
| 15 | public ByteBuffer ByteBuffer { get { return __p.bb; } } |
| 16 | public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); } |
| 17 | public StructOfStructsOfStructs __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } |
| 18 | |
| 19 | public MyGame.Example.StructOfStructs A { get { return (new MyGame.Example.StructOfStructs()).__assign(__p.bb_pos + 0, __p.bb); } } |
| 20 | |
| 21 | public static Offset<MyGame.Example.StructOfStructsOfStructs> CreateStructOfStructsOfStructs(FlatBufferBuilder builder, uint a_a_Id, uint a_a_Distance, short a_b_A, sbyte a_b_B, uint a_c_Id, uint a_c_Distance) { |
| 22 | builder.Prep(4, 20); |
| 23 | builder.Prep(4, 20); |
| 24 | builder.Prep(4, 8); |
| 25 | builder.PutUint(a_c_Distance); |
| 26 | builder.PutUint(a_c_Id); |
| 27 | builder.Prep(2, 4); |
| 28 | builder.Pad(1); |
| 29 | builder.PutSbyte(a_b_B); |
| 30 | builder.PutShort(a_b_A); |
| 31 | builder.Prep(4, 8); |
| 32 | builder.PutUint(a_a_Distance); |
| 33 | builder.PutUint(a_a_Id); |
| 34 | return new Offset<MyGame.Example.StructOfStructsOfStructs>(builder.Offset); |
| 35 | } |
| 36 | public StructOfStructsOfStructsT UnPack() { |
| 37 | var _o = new StructOfStructsOfStructsT(); |
| 38 | this.UnPackTo(_o); |
| 39 | return _o; |
| 40 | } |
| 41 | public void UnPackTo(StructOfStructsOfStructsT _o) { |
| 42 | _o.A = this.A.UnPack(); |
| 43 | } |
| 44 | public static Offset<MyGame.Example.StructOfStructsOfStructs> Pack(FlatBufferBuilder builder, StructOfStructsOfStructsT _o) { |
| 45 | if (_o == null) return default(Offset<MyGame.Example.StructOfStructsOfStructs>); |
| 46 | var _a_a_id = _o.A.A.Id; |
| 47 | var _a_a_distance = _o.A.A.Distance; |
| 48 | var _a_b_a = _o.A.B.A; |
| 49 | var _a_b_b = _o.A.B.B; |
| 50 | var _a_c_id = _o.A.C.Id; |
| 51 | var _a_c_distance = _o.A.C.Distance; |
| 52 | return CreateStructOfStructsOfStructs( |
| 53 | builder, |
| 54 | _a_a_id, |
| 55 | _a_a_distance, |
| 56 | _a_b_a, |
| 57 | _a_b_b, |
| 58 | _a_c_id, |
| 59 | _a_c_distance); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | public class StructOfStructsOfStructsT |
| 64 | { |
| 65 | [Newtonsoft.Json.JsonProperty("a")] |
| 66 | public MyGame.Example.StructOfStructsT A { get; set; } |
| 67 | |
| 68 | public StructOfStructsOfStructsT() { |
| 69 | this.A = new MyGame.Example.StructOfStructsT(); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | |
| 74 | } |