...
1// <auto-generated>
2// automatically generated by the FlatBuffers compiler, do not modify
3// </auto-generated>
4
5namespace MyGame.Example
6{
7
8using global::System;
9using global::System.Collections.Generic;
10using global::Google.FlatBuffers;
11
12public struct Test : 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 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); } }
20 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); } }
22 public void MutateB(sbyte b) { __p.bb.PutSbyte(__p.bb_pos + 2, b); }
23
24 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 }
31 public TestT UnPack() {
32 var _o = new TestT();
33 this.UnPackTo(_o);
34 return _o;
35 }
36 public void UnPackTo(TestT _o) {
37 _o.A = this.A;
38 _o.B = this.B;
39 }
40 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
49public 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
56 public TestT() {
57 this.A = 0;
58 this.B = 0;
59 }
60}
61
62
63}
View as plain text