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::FlatBuffers; 11 12 public struct Test : IFlatbufferObject 13 { 14 private Struct __p; 15 public ByteBuffer ByteBuffer { get { return __p.bb; } } __initMyGame.Example.Test16 public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); } __assignMyGame.Example.Test17 public Test __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 18 19 public short A { get { return __p.bb.GetShort(__p.bb_pos + 0); } } MutateAMyGame.Example.Test20 public void MutateA(short a) { __p.bb.PutShort(__p.bb_pos + 0, a); } 21 public sbyte B { get { return __p.bb.GetSbyte(__p.bb_pos + 2); } } MutateBMyGame.Example.Test22 public void MutateB(sbyte b) { __p.bb.PutSbyte(__p.bb_pos + 2, b); } 23 CreateTestMyGame.Example.Test24 public static Offset<MyGame.Example.Test> CreateTest(FlatBufferBuilder builder, short A, sbyte B) { 25 builder.Prep(2, 4); 26 builder.Pad(1); 27 builder.PutSbyte(B); 28 builder.PutShort(A); 29 return new Offset<MyGame.Example.Test>(builder.Offset); 30 } UnPackMyGame.Example.Test31 public TestT UnPack() { 32 var _o = new TestT(); 33 this.UnPackTo(_o); 34 return _o; 35 } UnPackToMyGame.Example.Test36 public void UnPackTo(TestT _o) { 37 _o.A = this.A; 38 _o.B = this.B; 39 } PackMyGame.Example.Test40 public static Offset<MyGame.Example.Test> Pack(FlatBufferBuilder builder, TestT _o) { 41 if (_o == null) return default(Offset<MyGame.Example.Test>); 42 return CreateTest( 43 builder, 44 _o.A, 45 _o.B); 46 } 47 }; 48 49 public class TestT 50 { 51 [Newtonsoft.Json.JsonProperty("a")] 52 public short A { get; set; } 53 [Newtonsoft.Json.JsonProperty("b")] 54 public sbyte B { get; set; } 55 TestT()56 public TestT() { 57 this.A = 0; 58 this.B = 0; 59 } 60 } 61 62 63 } 64