1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 namespace MyGame.Example 4 { 5 6 using System; 7 using FlatBuffers; 8 9 public struct Test : IFlatbufferObject 10 { 11 private Struct __p; 12 public ByteBuffer ByteBuffer { get { return __p.bb; } } 13 public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } 14 public Test __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 15 16 public short A { get { return __p.bb.GetShort(__p.bb_pos + 0); } } 17 public void MutateA(short a) { __p.bb.PutShort(__p.bb_pos + 0, a); } 18 public sbyte B { get { return __p.bb.GetSbyte(__p.bb_pos + 2); } } 19 public void MutateB(sbyte b) { __p.bb.PutSbyte(__p.bb_pos + 2, b); } 20 21 public static Offset<Test> CreateTest(FlatBufferBuilder builder, short A, sbyte B) { 22 builder.Prep(2, 4); 23 builder.Pad(1); 24 builder.PutSbyte(B); 25 builder.PutShort(A); 26 return new Offset<Test>(builder.Offset); 27 } 28 }; 29 30 31 } 32