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 /// an example documentation comment: "monster object"
13 public struct Monster : IFlatbufferObject
14 {
15   private Table __p;
16   public ByteBuffer ByteBuffer { get { return __p.bb; } }
ValidateVersionMyGame.Example.Monster17   public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_12_0(); }
GetRootAsMonsterMyGame.Example.Monster18   public static Monster GetRootAsMonster(ByteBuffer _bb) { return GetRootAsMonster(_bb, new Monster()); }
GetRootAsMonsterMyGame.Example.Monster19   public static Monster GetRootAsMonster(ByteBuffer _bb, Monster obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
MonsterBufferHasIdentifierMyGame.Example.Monster20   public static bool MonsterBufferHasIdentifier(ByteBuffer _bb) { return Table.__has_identifier(_bb, "MONS"); }
__initMyGame.Example.Monster21   public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
__assignMyGame.Example.Monster22   public Monster __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
23 
24   public MyGame.Example.Vec3? Pos { get { int o = __p.__offset(4); return o != 0 ? (MyGame.Example.Vec3?)(new MyGame.Example.Vec3()).__assign(o + __p.bb_pos, __p.bb) : null; } }
25   public short Mana { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetShort(o + __p.bb_pos) : (short)150; } }
MutateManaMyGame.Example.Monster26   public bool MutateMana(short mana) { int o = __p.__offset(6); if (o != 0) { __p.bb.PutShort(o + __p.bb_pos, mana); return true; } else { return false; } }
27   public short Hp { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetShort(o + __p.bb_pos) : (short)100; } }
MutateHpMyGame.Example.Monster28   public bool MutateHp(short hp) { int o = __p.__offset(8); if (o != 0) { __p.bb.PutShort(o + __p.bb_pos, hp); return true; } else { return false; } }
29   public string Name { get { int o = __p.__offset(10); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
30 #if ENABLE_SPAN_T
GetNameBytesMyGame.Example.Monster31   public Span<byte> GetNameBytes() { return __p.__vector_as_span<byte>(10, 1); }
32 #else
GetNameBytesMyGame.Example.Monster33   public ArraySegment<byte>? GetNameBytes() { return __p.__vector_as_arraysegment(10); }
34 #endif
GetNameArrayMyGame.Example.Monster35   public byte[] GetNameArray() { return __p.__vector_as_array<byte>(10); }
InventoryMyGame.Example.Monster36   public byte Inventory(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.Get(__p.__vector(o) + j * 1) : (byte)0; }
37   public int InventoryLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
38 #if ENABLE_SPAN_T
GetInventoryBytesMyGame.Example.Monster39   public Span<byte> GetInventoryBytes() { return __p.__vector_as_span<byte>(14, 1); }
40 #else
GetInventoryBytesMyGame.Example.Monster41   public ArraySegment<byte>? GetInventoryBytes() { return __p.__vector_as_arraysegment(14); }
42 #endif
GetInventoryArrayMyGame.Example.Monster43   public byte[] GetInventoryArray() { return __p.__vector_as_array<byte>(14); }
MutateInventoryMyGame.Example.Monster44   public bool MutateInventory(int j, byte inventory) { int o = __p.__offset(14); if (o != 0) { __p.bb.Put(__p.__vector(o) + j * 1, inventory); return true; } else { return false; } }
45   public MyGame.Example.Color Color { get { int o = __p.__offset(16); return o != 0 ? (MyGame.Example.Color)__p.bb.Get(o + __p.bb_pos) : MyGame.Example.Color.Blue; } }
MutateColorMyGame.Example.Monster46   public bool MutateColor(MyGame.Example.Color color) { int o = __p.__offset(16); if (o != 0) { __p.bb.Put(o + __p.bb_pos, (byte)color); return true; } else { return false; } }
47   public MyGame.Example.Any TestType { get { int o = __p.__offset(18); return o != 0 ? (MyGame.Example.Any)__p.bb.Get(o + __p.bb_pos) : MyGame.Example.Any.NONE; } }
48   public TTable? Test<TTable>() where TTable : struct, IFlatbufferObject { int o = __p.__offset(20); return o != 0 ? (TTable?)__p.__union<TTable>(o + __p.bb_pos) : null; }
Test4MyGame.Example.Monster49   public MyGame.Example.Test? Test4(int j) { int o = __p.__offset(22); return o != 0 ? (MyGame.Example.Test?)(new MyGame.Example.Test()).__assign(__p.__vector(o) + j * 4, __p.bb) : null; }
50   public int Test4Length { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } }
TestarrayofstringMyGame.Example.Monster51   public string Testarrayofstring(int j) { int o = __p.__offset(24); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
52   public int TestarrayofstringLength { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } }
53   /// an example documentation comment: this will end up in the generated code
54   /// multiline too
TestarrayoftablesMyGame.Example.Monster55   public MyGame.Example.Monster? Testarrayoftables(int j) { int o = __p.__offset(26); return o != 0 ? (MyGame.Example.Monster?)(new MyGame.Example.Monster()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
56   public int TestarrayoftablesLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } }
TestarrayoftablesByKeyMyGame.Example.Monster57   public MyGame.Example.Monster? TestarrayoftablesByKey(string key) { int o = __p.__offset(26); return o != 0 ? MyGame.Example.Monster.__lookup_by_key(__p.__vector(o), key, __p.bb) : null; }
58   public MyGame.Example.Monster? Enemy { get { int o = __p.__offset(28); return o != 0 ? (MyGame.Example.Monster?)(new MyGame.Example.Monster()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
TestnestedflatbufferMyGame.Example.Monster59   public byte Testnestedflatbuffer(int j) { int o = __p.__offset(30); return o != 0 ? __p.bb.Get(__p.__vector(o) + j * 1) : (byte)0; }
60   public int TestnestedflatbufferLength { get { int o = __p.__offset(30); return o != 0 ? __p.__vector_len(o) : 0; } }
61 #if ENABLE_SPAN_T
GetTestnestedflatbufferBytesMyGame.Example.Monster62   public Span<byte> GetTestnestedflatbufferBytes() { return __p.__vector_as_span<byte>(30, 1); }
63 #else
GetTestnestedflatbufferBytesMyGame.Example.Monster64   public ArraySegment<byte>? GetTestnestedflatbufferBytes() { return __p.__vector_as_arraysegment(30); }
65 #endif
GetTestnestedflatbufferArrayMyGame.Example.Monster66   public byte[] GetTestnestedflatbufferArray() { return __p.__vector_as_array<byte>(30); }
GetTestnestedflatbufferAsMonsterMyGame.Example.Monster67   public MyGame.Example.Monster? GetTestnestedflatbufferAsMonster() { int o = __p.__offset(30); return o != 0 ? (MyGame.Example.Monster?)(new MyGame.Example.Monster()).__assign(__p.__indirect(__p.__vector(o)), __p.bb) : null; }
MutateTestnestedflatbufferMyGame.Example.Monster68   public bool MutateTestnestedflatbuffer(int j, byte testnestedflatbuffer) { int o = __p.__offset(30); if (o != 0) { __p.bb.Put(__p.__vector(o) + j * 1, testnestedflatbuffer); return true; } else { return false; } }
69   public MyGame.Example.Stat? Testempty { get { int o = __p.__offset(32); return o != 0 ? (MyGame.Example.Stat?)(new MyGame.Example.Stat()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
70   public bool Testbool { get { int o = __p.__offset(34); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
MutateTestboolMyGame.Example.Monster71   public bool MutateTestbool(bool testbool) { int o = __p.__offset(34); if (o != 0) { __p.bb.Put(o + __p.bb_pos, (byte)(testbool ? 1 : 0)); return true; } else { return false; } }
72   public int Testhashs32Fnv1 { get { int o = __p.__offset(36); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
MutateTesthashs32Fnv1MyGame.Example.Monster73   public bool MutateTesthashs32Fnv1(int testhashs32_fnv1) { int o = __p.__offset(36); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, testhashs32_fnv1); return true; } else { return false; } }
74   public uint Testhashu32Fnv1 { get { int o = __p.__offset(38); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
MutateTesthashu32Fnv1MyGame.Example.Monster75   public bool MutateTesthashu32Fnv1(uint testhashu32_fnv1) { int o = __p.__offset(38); if (o != 0) { __p.bb.PutUint(o + __p.bb_pos, testhashu32_fnv1); return true; } else { return false; } }
76   public long Testhashs64Fnv1 { get { int o = __p.__offset(40); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
MutateTesthashs64Fnv1MyGame.Example.Monster77   public bool MutateTesthashs64Fnv1(long testhashs64_fnv1) { int o = __p.__offset(40); if (o != 0) { __p.bb.PutLong(o + __p.bb_pos, testhashs64_fnv1); return true; } else { return false; } }
78   public ulong Testhashu64Fnv1 { get { int o = __p.__offset(42); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } }
MutateTesthashu64Fnv1MyGame.Example.Monster79   public bool MutateTesthashu64Fnv1(ulong testhashu64_fnv1) { int o = __p.__offset(42); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, testhashu64_fnv1); return true; } else { return false; } }
80   public int Testhashs32Fnv1a { get { int o = __p.__offset(44); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
MutateTesthashs32Fnv1aMyGame.Example.Monster81   public bool MutateTesthashs32Fnv1a(int testhashs32_fnv1a) { int o = __p.__offset(44); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, testhashs32_fnv1a); return true; } else { return false; } }
82   public uint Testhashu32Fnv1a { get { int o = __p.__offset(46); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
MutateTesthashu32Fnv1aMyGame.Example.Monster83   public bool MutateTesthashu32Fnv1a(uint testhashu32_fnv1a) { int o = __p.__offset(46); if (o != 0) { __p.bb.PutUint(o + __p.bb_pos, testhashu32_fnv1a); return true; } else { return false; } }
84   public long Testhashs64Fnv1a { get { int o = __p.__offset(48); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
MutateTesthashs64Fnv1aMyGame.Example.Monster85   public bool MutateTesthashs64Fnv1a(long testhashs64_fnv1a) { int o = __p.__offset(48); if (o != 0) { __p.bb.PutLong(o + __p.bb_pos, testhashs64_fnv1a); return true; } else { return false; } }
86   public ulong Testhashu64Fnv1a { get { int o = __p.__offset(50); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } }
MutateTesthashu64Fnv1aMyGame.Example.Monster87   public bool MutateTesthashu64Fnv1a(ulong testhashu64_fnv1a) { int o = __p.__offset(50); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, testhashu64_fnv1a); return true; } else { return false; } }
TestarrayofboolsMyGame.Example.Monster88   public bool Testarrayofbools(int j) { int o = __p.__offset(52); return o != 0 ? 0!=__p.bb.Get(__p.__vector(o) + j * 1) : false; }
89   public int TestarrayofboolsLength { get { int o = __p.__offset(52); return o != 0 ? __p.__vector_len(o) : 0; } }
90 #if ENABLE_SPAN_T
GetTestarrayofboolsBytesMyGame.Example.Monster91   public Span<bool> GetTestarrayofboolsBytes() { return __p.__vector_as_span<bool>(52, 1); }
92 #else
GetTestarrayofboolsBytesMyGame.Example.Monster93   public ArraySegment<byte>? GetTestarrayofboolsBytes() { return __p.__vector_as_arraysegment(52); }
94 #endif
GetTestarrayofboolsArrayMyGame.Example.Monster95   public bool[] GetTestarrayofboolsArray() { return __p.__vector_as_array<bool>(52); }
MutateTestarrayofboolsMyGame.Example.Monster96   public bool MutateTestarrayofbools(int j, bool testarrayofbools) { int o = __p.__offset(52); if (o != 0) { __p.bb.Put(__p.__vector(o) + j * 1, (byte)(testarrayofbools ? 1 : 0)); return true; } else { return false; } }
97   public float Testf { get { int o = __p.__offset(54); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)3.14159f; } }
MutateTestfMyGame.Example.Monster98   public bool MutateTestf(float testf) { int o = __p.__offset(54); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, testf); return true; } else { return false; } }
99   public float Testf2 { get { int o = __p.__offset(56); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)3.0f; } }
MutateTestf2MyGame.Example.Monster100   public bool MutateTestf2(float testf2) { int o = __p.__offset(56); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, testf2); return true; } else { return false; } }
101   public float Testf3 { get { int o = __p.__offset(58); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
MutateTestf3MyGame.Example.Monster102   public bool MutateTestf3(float testf3) { int o = __p.__offset(58); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, testf3); return true; } else { return false; } }
Testarrayofstring2MyGame.Example.Monster103   public string Testarrayofstring2(int j) { int o = __p.__offset(60); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
104   public int Testarrayofstring2Length { get { int o = __p.__offset(60); return o != 0 ? __p.__vector_len(o) : 0; } }
TestarrayofsortedstructMyGame.Example.Monster105   public MyGame.Example.Ability? Testarrayofsortedstruct(int j) { int o = __p.__offset(62); return o != 0 ? (MyGame.Example.Ability?)(new MyGame.Example.Ability()).__assign(__p.__vector(o) + j * 8, __p.bb) : null; }
106   public int TestarrayofsortedstructLength { get { int o = __p.__offset(62); return o != 0 ? __p.__vector_len(o) : 0; } }
FlexMyGame.Example.Monster107   public byte Flex(int j) { int o = __p.__offset(64); return o != 0 ? __p.bb.Get(__p.__vector(o) + j * 1) : (byte)0; }
108   public int FlexLength { get { int o = __p.__offset(64); return o != 0 ? __p.__vector_len(o) : 0; } }
109 #if ENABLE_SPAN_T
GetFlexBytesMyGame.Example.Monster110   public Span<byte> GetFlexBytes() { return __p.__vector_as_span<byte>(64, 1); }
111 #else
GetFlexBytesMyGame.Example.Monster112   public ArraySegment<byte>? GetFlexBytes() { return __p.__vector_as_arraysegment(64); }
113 #endif
GetFlexArrayMyGame.Example.Monster114   public byte[] GetFlexArray() { return __p.__vector_as_array<byte>(64); }
MutateFlexMyGame.Example.Monster115   public bool MutateFlex(int j, byte flex) { int o = __p.__offset(64); if (o != 0) { __p.bb.Put(__p.__vector(o) + j * 1, flex); return true; } else { return false; } }
Test5MyGame.Example.Monster116   public MyGame.Example.Test? Test5(int j) { int o = __p.__offset(66); return o != 0 ? (MyGame.Example.Test?)(new MyGame.Example.Test()).__assign(__p.__vector(o) + j * 4, __p.bb) : null; }
117   public int Test5Length { get { int o = __p.__offset(66); return o != 0 ? __p.__vector_len(o) : 0; } }
VectorOfLongsMyGame.Example.Monster118   public long VectorOfLongs(int j) { int o = __p.__offset(68); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
119   public int VectorOfLongsLength { get { int o = __p.__offset(68); return o != 0 ? __p.__vector_len(o) : 0; } }
120 #if ENABLE_SPAN_T
GetVectorOfLongsBytesMyGame.Example.Monster121   public Span<long> GetVectorOfLongsBytes() { return __p.__vector_as_span<long>(68, 8); }
122 #else
GetVectorOfLongsBytesMyGame.Example.Monster123   public ArraySegment<byte>? GetVectorOfLongsBytes() { return __p.__vector_as_arraysegment(68); }
124 #endif
GetVectorOfLongsArrayMyGame.Example.Monster125   public long[] GetVectorOfLongsArray() { return __p.__vector_as_array<long>(68); }
MutateVectorOfLongsMyGame.Example.Monster126   public bool MutateVectorOfLongs(int j, long vector_of_longs) { int o = __p.__offset(68); if (o != 0) { __p.bb.PutLong(__p.__vector(o) + j * 8, vector_of_longs); return true; } else { return false; } }
VectorOfDoublesMyGame.Example.Monster127   public double VectorOfDoubles(int j) { int o = __p.__offset(70); return o != 0 ? __p.bb.GetDouble(__p.__vector(o) + j * 8) : (double)0; }
128   public int VectorOfDoublesLength { get { int o = __p.__offset(70); return o != 0 ? __p.__vector_len(o) : 0; } }
129 #if ENABLE_SPAN_T
GetVectorOfDoublesBytesMyGame.Example.Monster130   public Span<double> GetVectorOfDoublesBytes() { return __p.__vector_as_span<double>(70, 8); }
131 #else
GetVectorOfDoublesBytesMyGame.Example.Monster132   public ArraySegment<byte>? GetVectorOfDoublesBytes() { return __p.__vector_as_arraysegment(70); }
133 #endif
GetVectorOfDoublesArrayMyGame.Example.Monster134   public double[] GetVectorOfDoublesArray() { return __p.__vector_as_array<double>(70); }
MutateVectorOfDoublesMyGame.Example.Monster135   public bool MutateVectorOfDoubles(int j, double vector_of_doubles) { int o = __p.__offset(70); if (o != 0) { __p.bb.PutDouble(__p.__vector(o) + j * 8, vector_of_doubles); return true; } else { return false; } }
136   public MyGame.InParentNamespace? ParentNamespaceTest { get { int o = __p.__offset(72); return o != 0 ? (MyGame.InParentNamespace?)(new MyGame.InParentNamespace()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
VectorOfReferrablesMyGame.Example.Monster137   public MyGame.Example.Referrable? VectorOfReferrables(int j) { int o = __p.__offset(74); return o != 0 ? (MyGame.Example.Referrable?)(new MyGame.Example.Referrable()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
138   public int VectorOfReferrablesLength { get { int o = __p.__offset(74); return o != 0 ? __p.__vector_len(o) : 0; } }
VectorOfReferrablesByKeyMyGame.Example.Monster139   public MyGame.Example.Referrable? VectorOfReferrablesByKey(ulong key) { int o = __p.__offset(74); return o != 0 ? MyGame.Example.Referrable.__lookup_by_key(__p.__vector(o), key, __p.bb) : null; }
140   public ulong SingleWeakReference { get { int o = __p.__offset(76); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } }
MutateSingleWeakReferenceMyGame.Example.Monster141   public bool MutateSingleWeakReference(ulong single_weak_reference) { int o = __p.__offset(76); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, single_weak_reference); return true; } else { return false; } }
VectorOfWeakReferencesMyGame.Example.Monster142   public ulong VectorOfWeakReferences(int j) { int o = __p.__offset(78); return o != 0 ? __p.bb.GetUlong(__p.__vector(o) + j * 8) : (ulong)0; }
143   public int VectorOfWeakReferencesLength { get { int o = __p.__offset(78); return o != 0 ? __p.__vector_len(o) : 0; } }
144 #if ENABLE_SPAN_T
GetVectorOfWeakReferencesBytesMyGame.Example.Monster145   public Span<ulong> GetVectorOfWeakReferencesBytes() { return __p.__vector_as_span<ulong>(78, 8); }
146 #else
GetVectorOfWeakReferencesBytesMyGame.Example.Monster147   public ArraySegment<byte>? GetVectorOfWeakReferencesBytes() { return __p.__vector_as_arraysegment(78); }
148 #endif
GetVectorOfWeakReferencesArrayMyGame.Example.Monster149   public ulong[] GetVectorOfWeakReferencesArray() { return __p.__vector_as_array<ulong>(78); }
MutateVectorOfWeakReferencesMyGame.Example.Monster150   public bool MutateVectorOfWeakReferences(int j, ulong vector_of_weak_references) { int o = __p.__offset(78); if (o != 0) { __p.bb.PutUlong(__p.__vector(o) + j * 8, vector_of_weak_references); return true; } else { return false; } }
VectorOfStrongReferrablesMyGame.Example.Monster151   public MyGame.Example.Referrable? VectorOfStrongReferrables(int j) { int o = __p.__offset(80); return o != 0 ? (MyGame.Example.Referrable?)(new MyGame.Example.Referrable()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
152   public int VectorOfStrongReferrablesLength { get { int o = __p.__offset(80); return o != 0 ? __p.__vector_len(o) : 0; } }
VectorOfStrongReferrablesByKeyMyGame.Example.Monster153   public MyGame.Example.Referrable? VectorOfStrongReferrablesByKey(ulong key) { int o = __p.__offset(80); return o != 0 ? MyGame.Example.Referrable.__lookup_by_key(__p.__vector(o), key, __p.bb) : null; }
154   public ulong CoOwningReference { get { int o = __p.__offset(82); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } }
MutateCoOwningReferenceMyGame.Example.Monster155   public bool MutateCoOwningReference(ulong co_owning_reference) { int o = __p.__offset(82); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, co_owning_reference); return true; } else { return false; } }
VectorOfCoOwningReferencesMyGame.Example.Monster156   public ulong VectorOfCoOwningReferences(int j) { int o = __p.__offset(84); return o != 0 ? __p.bb.GetUlong(__p.__vector(o) + j * 8) : (ulong)0; }
157   public int VectorOfCoOwningReferencesLength { get { int o = __p.__offset(84); return o != 0 ? __p.__vector_len(o) : 0; } }
158 #if ENABLE_SPAN_T
GetVectorOfCoOwningReferencesBytesMyGame.Example.Monster159   public Span<ulong> GetVectorOfCoOwningReferencesBytes() { return __p.__vector_as_span<ulong>(84, 8); }
160 #else
GetVectorOfCoOwningReferencesBytesMyGame.Example.Monster161   public ArraySegment<byte>? GetVectorOfCoOwningReferencesBytes() { return __p.__vector_as_arraysegment(84); }
162 #endif
GetVectorOfCoOwningReferencesArrayMyGame.Example.Monster163   public ulong[] GetVectorOfCoOwningReferencesArray() { return __p.__vector_as_array<ulong>(84); }
MutateVectorOfCoOwningReferencesMyGame.Example.Monster164   public bool MutateVectorOfCoOwningReferences(int j, ulong vector_of_co_owning_references) { int o = __p.__offset(84); if (o != 0) { __p.bb.PutUlong(__p.__vector(o) + j * 8, vector_of_co_owning_references); return true; } else { return false; } }
165   public ulong NonOwningReference { get { int o = __p.__offset(86); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } }
MutateNonOwningReferenceMyGame.Example.Monster166   public bool MutateNonOwningReference(ulong non_owning_reference) { int o = __p.__offset(86); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, non_owning_reference); return true; } else { return false; } }
VectorOfNonOwningReferencesMyGame.Example.Monster167   public ulong VectorOfNonOwningReferences(int j) { int o = __p.__offset(88); return o != 0 ? __p.bb.GetUlong(__p.__vector(o) + j * 8) : (ulong)0; }
168   public int VectorOfNonOwningReferencesLength { get { int o = __p.__offset(88); return o != 0 ? __p.__vector_len(o) : 0; } }
169 #if ENABLE_SPAN_T
GetVectorOfNonOwningReferencesBytesMyGame.Example.Monster170   public Span<ulong> GetVectorOfNonOwningReferencesBytes() { return __p.__vector_as_span<ulong>(88, 8); }
171 #else
GetVectorOfNonOwningReferencesBytesMyGame.Example.Monster172   public ArraySegment<byte>? GetVectorOfNonOwningReferencesBytes() { return __p.__vector_as_arraysegment(88); }
173 #endif
GetVectorOfNonOwningReferencesArrayMyGame.Example.Monster174   public ulong[] GetVectorOfNonOwningReferencesArray() { return __p.__vector_as_array<ulong>(88); }
MutateVectorOfNonOwningReferencesMyGame.Example.Monster175   public bool MutateVectorOfNonOwningReferences(int j, ulong vector_of_non_owning_references) { int o = __p.__offset(88); if (o != 0) { __p.bb.PutUlong(__p.__vector(o) + j * 8, vector_of_non_owning_references); return true; } else { return false; } }
176   public MyGame.Example.AnyUniqueAliases AnyUniqueType { get { int o = __p.__offset(90); return o != 0 ? (MyGame.Example.AnyUniqueAliases)__p.bb.Get(o + __p.bb_pos) : MyGame.Example.AnyUniqueAliases.NONE; } }
177   public TTable? AnyUnique<TTable>() where TTable : struct, IFlatbufferObject { int o = __p.__offset(92); return o != 0 ? (TTable?)__p.__union<TTable>(o + __p.bb_pos) : null; }
178   public MyGame.Example.AnyAmbiguousAliases AnyAmbiguousType { get { int o = __p.__offset(94); return o != 0 ? (MyGame.Example.AnyAmbiguousAliases)__p.bb.Get(o + __p.bb_pos) : MyGame.Example.AnyAmbiguousAliases.NONE; } }
179   public TTable? AnyAmbiguous<TTable>() where TTable : struct, IFlatbufferObject { int o = __p.__offset(96); return o != 0 ? (TTable?)__p.__union<TTable>(o + __p.bb_pos) : null; }
VectorOfEnumsMyGame.Example.Monster180   public MyGame.Example.Color VectorOfEnums(int j) { int o = __p.__offset(98); return o != 0 ? (MyGame.Example.Color)__p.bb.Get(__p.__vector(o) + j * 1) : (MyGame.Example.Color)0; }
181   public int VectorOfEnumsLength { get { int o = __p.__offset(98); return o != 0 ? __p.__vector_len(o) : 0; } }
182 #if ENABLE_SPAN_T
GetVectorOfEnumsBytesMyGame.Example.Monster183   public Span<MyGame.Example.Color> GetVectorOfEnumsBytes() { return __p.__vector_as_span<MyGame.Example.Color>(98, 1); }
184 #else
GetVectorOfEnumsBytesMyGame.Example.Monster185   public ArraySegment<byte>? GetVectorOfEnumsBytes() { return __p.__vector_as_arraysegment(98); }
186 #endif
GetVectorOfEnumsArrayMyGame.Example.Monster187   public MyGame.Example.Color[] GetVectorOfEnumsArray() { int o = __p.__offset(98); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); MyGame.Example.Color[] a = new MyGame.Example.Color[l]; for (int i = 0; i < l; i++) { a[i] = (MyGame.Example.Color)__p.bb.Get(p + i * 1); } return a; }
MutateVectorOfEnumsMyGame.Example.Monster188   public bool MutateVectorOfEnums(int j, MyGame.Example.Color vector_of_enums) { int o = __p.__offset(98); if (o != 0) { __p.bb.Put(__p.__vector(o) + j * 1, (byte)vector_of_enums); return true; } else { return false; } }
189   public MyGame.Example.Race SignedEnum { get { int o = __p.__offset(100); return o != 0 ? (MyGame.Example.Race)__p.bb.GetSbyte(o + __p.bb_pos) : MyGame.Example.Race.None; } }
MutateSignedEnumMyGame.Example.Monster190   public bool MutateSignedEnum(MyGame.Example.Race signed_enum) { int o = __p.__offset(100); if (o != 0) { __p.bb.PutSbyte(o + __p.bb_pos, (sbyte)signed_enum); return true; } else { return false; } }
191 
StartMonsterMyGame.Example.Monster192   public static void StartMonster(FlatBufferBuilder builder) { builder.StartTable(49); }
AddPosMyGame.Example.Monster193   public static void AddPos(FlatBufferBuilder builder, Offset<MyGame.Example.Vec3> posOffset) { builder.AddStruct(0, posOffset.Value, 0); }
AddManaMyGame.Example.Monster194   public static void AddMana(FlatBufferBuilder builder, short mana) { builder.AddShort(1, mana, 150); }
AddHpMyGame.Example.Monster195   public static void AddHp(FlatBufferBuilder builder, short hp) { builder.AddShort(2, hp, 100); }
AddNameMyGame.Example.Monster196   public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(3, nameOffset.Value, 0); }
AddInventoryMyGame.Example.Monster197   public static void AddInventory(FlatBufferBuilder builder, VectorOffset inventoryOffset) { builder.AddOffset(5, inventoryOffset.Value, 0); }
CreateInventoryVectorMyGame.Example.Monster198   public static VectorOffset CreateInventoryVector(FlatBufferBuilder builder, byte[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddByte(data[i]); return builder.EndVector(); }
CreateInventoryVectorBlockMyGame.Example.Monster199   public static VectorOffset CreateInventoryVectorBlock(FlatBufferBuilder builder, byte[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); }
StartInventoryVectorMyGame.Example.Monster200   public static void StartInventoryVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); }
AddColorMyGame.Example.Monster201   public static void AddColor(FlatBufferBuilder builder, MyGame.Example.Color color) { builder.AddByte(6, (byte)color, 8); }
AddTestTypeMyGame.Example.Monster202   public static void AddTestType(FlatBufferBuilder builder, MyGame.Example.Any testType) { builder.AddByte(7, (byte)testType, 0); }
AddTestMyGame.Example.Monster203   public static void AddTest(FlatBufferBuilder builder, int testOffset) { builder.AddOffset(8, testOffset, 0); }
AddTest4MyGame.Example.Monster204   public static void AddTest4(FlatBufferBuilder builder, VectorOffset test4Offset) { builder.AddOffset(9, test4Offset.Value, 0); }
StartTest4VectorMyGame.Example.Monster205   public static void StartTest4Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 2); }
AddTestarrayofstringMyGame.Example.Monster206   public static void AddTestarrayofstring(FlatBufferBuilder builder, VectorOffset testarrayofstringOffset) { builder.AddOffset(10, testarrayofstringOffset.Value, 0); }
CreateTestarrayofstringVectorMyGame.Example.Monster207   public static VectorOffset CreateTestarrayofstringVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
CreateTestarrayofstringVectorBlockMyGame.Example.Monster208   public static VectorOffset CreateTestarrayofstringVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
StartTestarrayofstringVectorMyGame.Example.Monster209   public static void StartTestarrayofstringVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
AddTestarrayoftablesMyGame.Example.Monster210   public static void AddTestarrayoftables(FlatBufferBuilder builder, VectorOffset testarrayoftablesOffset) { builder.AddOffset(11, testarrayoftablesOffset.Value, 0); }
CreateTestarrayoftablesVectorMyGame.Example.Monster211   public static VectorOffset CreateTestarrayoftablesVector(FlatBufferBuilder builder, Offset<MyGame.Example.Monster>[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
CreateTestarrayoftablesVectorBlockMyGame.Example.Monster212   public static VectorOffset CreateTestarrayoftablesVectorBlock(FlatBufferBuilder builder, Offset<MyGame.Example.Monster>[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
StartTestarrayoftablesVectorMyGame.Example.Monster213   public static void StartTestarrayoftablesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
AddEnemyMyGame.Example.Monster214   public static void AddEnemy(FlatBufferBuilder builder, Offset<MyGame.Example.Monster> enemyOffset) { builder.AddOffset(12, enemyOffset.Value, 0); }
AddTestnestedflatbufferMyGame.Example.Monster215   public static void AddTestnestedflatbuffer(FlatBufferBuilder builder, VectorOffset testnestedflatbufferOffset) { builder.AddOffset(13, testnestedflatbufferOffset.Value, 0); }
CreateTestnestedflatbufferVectorMyGame.Example.Monster216   public static VectorOffset CreateTestnestedflatbufferVector(FlatBufferBuilder builder, byte[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddByte(data[i]); return builder.EndVector(); }
CreateTestnestedflatbufferVectorBlockMyGame.Example.Monster217   public static VectorOffset CreateTestnestedflatbufferVectorBlock(FlatBufferBuilder builder, byte[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); }
StartTestnestedflatbufferVectorMyGame.Example.Monster218   public static void StartTestnestedflatbufferVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); }
AddTestemptyMyGame.Example.Monster219   public static void AddTestempty(FlatBufferBuilder builder, Offset<MyGame.Example.Stat> testemptyOffset) { builder.AddOffset(14, testemptyOffset.Value, 0); }
AddTestboolMyGame.Example.Monster220   public static void AddTestbool(FlatBufferBuilder builder, bool testbool) { builder.AddBool(15, testbool, false); }
AddTesthashs32Fnv1MyGame.Example.Monster221   public static void AddTesthashs32Fnv1(FlatBufferBuilder builder, int testhashs32Fnv1) { builder.AddInt(16, testhashs32Fnv1, 0); }
AddTesthashu32Fnv1MyGame.Example.Monster222   public static void AddTesthashu32Fnv1(FlatBufferBuilder builder, uint testhashu32Fnv1) { builder.AddUint(17, testhashu32Fnv1, 0); }
AddTesthashs64Fnv1MyGame.Example.Monster223   public static void AddTesthashs64Fnv1(FlatBufferBuilder builder, long testhashs64Fnv1) { builder.AddLong(18, testhashs64Fnv1, 0); }
AddTesthashu64Fnv1MyGame.Example.Monster224   public static void AddTesthashu64Fnv1(FlatBufferBuilder builder, ulong testhashu64Fnv1) { builder.AddUlong(19, testhashu64Fnv1, 0); }
AddTesthashs32Fnv1aMyGame.Example.Monster225   public static void AddTesthashs32Fnv1a(FlatBufferBuilder builder, int testhashs32Fnv1a) { builder.AddInt(20, testhashs32Fnv1a, 0); }
AddTesthashu32Fnv1aMyGame.Example.Monster226   public static void AddTesthashu32Fnv1a(FlatBufferBuilder builder, uint testhashu32Fnv1a) { builder.AddUint(21, testhashu32Fnv1a, 0); }
AddTesthashs64Fnv1aMyGame.Example.Monster227   public static void AddTesthashs64Fnv1a(FlatBufferBuilder builder, long testhashs64Fnv1a) { builder.AddLong(22, testhashs64Fnv1a, 0); }
AddTesthashu64Fnv1aMyGame.Example.Monster228   public static void AddTesthashu64Fnv1a(FlatBufferBuilder builder, ulong testhashu64Fnv1a) { builder.AddUlong(23, testhashu64Fnv1a, 0); }
AddTestarrayofboolsMyGame.Example.Monster229   public static void AddTestarrayofbools(FlatBufferBuilder builder, VectorOffset testarrayofboolsOffset) { builder.AddOffset(24, testarrayofboolsOffset.Value, 0); }
CreateTestarrayofboolsVectorMyGame.Example.Monster230   public static VectorOffset CreateTestarrayofboolsVector(FlatBufferBuilder builder, bool[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddBool(data[i]); return builder.EndVector(); }
CreateTestarrayofboolsVectorBlockMyGame.Example.Monster231   public static VectorOffset CreateTestarrayofboolsVectorBlock(FlatBufferBuilder builder, bool[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); }
StartTestarrayofboolsVectorMyGame.Example.Monster232   public static void StartTestarrayofboolsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); }
AddTestfMyGame.Example.Monster233   public static void AddTestf(FlatBufferBuilder builder, float testf) { builder.AddFloat(25, testf, 3.14159f); }
AddTestf2MyGame.Example.Monster234   public static void AddTestf2(FlatBufferBuilder builder, float testf2) { builder.AddFloat(26, testf2, 3.0f); }
AddTestf3MyGame.Example.Monster235   public static void AddTestf3(FlatBufferBuilder builder, float testf3) { builder.AddFloat(27, testf3, 0.0f); }
AddTestarrayofstring2MyGame.Example.Monster236   public static void AddTestarrayofstring2(FlatBufferBuilder builder, VectorOffset testarrayofstring2Offset) { builder.AddOffset(28, testarrayofstring2Offset.Value, 0); }
CreateTestarrayofstring2VectorMyGame.Example.Monster237   public static VectorOffset CreateTestarrayofstring2Vector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
CreateTestarrayofstring2VectorBlockMyGame.Example.Monster238   public static VectorOffset CreateTestarrayofstring2VectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
StartTestarrayofstring2VectorMyGame.Example.Monster239   public static void StartTestarrayofstring2Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
AddTestarrayofsortedstructMyGame.Example.Monster240   public static void AddTestarrayofsortedstruct(FlatBufferBuilder builder, VectorOffset testarrayofsortedstructOffset) { builder.AddOffset(29, testarrayofsortedstructOffset.Value, 0); }
StartTestarrayofsortedstructVectorMyGame.Example.Monster241   public static void StartTestarrayofsortedstructVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 4); }
AddFlexMyGame.Example.Monster242   public static void AddFlex(FlatBufferBuilder builder, VectorOffset flexOffset) { builder.AddOffset(30, flexOffset.Value, 0); }
CreateFlexVectorMyGame.Example.Monster243   public static VectorOffset CreateFlexVector(FlatBufferBuilder builder, byte[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddByte(data[i]); return builder.EndVector(); }
CreateFlexVectorBlockMyGame.Example.Monster244   public static VectorOffset CreateFlexVectorBlock(FlatBufferBuilder builder, byte[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); }
StartFlexVectorMyGame.Example.Monster245   public static void StartFlexVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); }
AddTest5MyGame.Example.Monster246   public static void AddTest5(FlatBufferBuilder builder, VectorOffset test5Offset) { builder.AddOffset(31, test5Offset.Value, 0); }
StartTest5VectorMyGame.Example.Monster247   public static void StartTest5Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 2); }
AddVectorOfLongsMyGame.Example.Monster248   public static void AddVectorOfLongs(FlatBufferBuilder builder, VectorOffset vectorOfLongsOffset) { builder.AddOffset(32, vectorOfLongsOffset.Value, 0); }
CreateVectorOfLongsVectorMyGame.Example.Monster249   public static VectorOffset CreateVectorOfLongsVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
CreateVectorOfLongsVectorBlockMyGame.Example.Monster250   public static VectorOffset CreateVectorOfLongsVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
StartVectorOfLongsVectorMyGame.Example.Monster251   public static void StartVectorOfLongsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
AddVectorOfDoublesMyGame.Example.Monster252   public static void AddVectorOfDoubles(FlatBufferBuilder builder, VectorOffset vectorOfDoublesOffset) { builder.AddOffset(33, vectorOfDoublesOffset.Value, 0); }
CreateVectorOfDoublesVectorMyGame.Example.Monster253   public static VectorOffset CreateVectorOfDoublesVector(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddDouble(data[i]); return builder.EndVector(); }
CreateVectorOfDoublesVectorBlockMyGame.Example.Monster254   public static VectorOffset CreateVectorOfDoublesVectorBlock(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
StartVectorOfDoublesVectorMyGame.Example.Monster255   public static void StartVectorOfDoublesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
AddParentNamespaceTestMyGame.Example.Monster256   public static void AddParentNamespaceTest(FlatBufferBuilder builder, Offset<MyGame.InParentNamespace> parentNamespaceTestOffset) { builder.AddOffset(34, parentNamespaceTestOffset.Value, 0); }
AddVectorOfReferrablesMyGame.Example.Monster257   public static void AddVectorOfReferrables(FlatBufferBuilder builder, VectorOffset vectorOfReferrablesOffset) { builder.AddOffset(35, vectorOfReferrablesOffset.Value, 0); }
CreateVectorOfReferrablesVectorMyGame.Example.Monster258   public static VectorOffset CreateVectorOfReferrablesVector(FlatBufferBuilder builder, Offset<MyGame.Example.Referrable>[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
CreateVectorOfReferrablesVectorBlockMyGame.Example.Monster259   public static VectorOffset CreateVectorOfReferrablesVectorBlock(FlatBufferBuilder builder, Offset<MyGame.Example.Referrable>[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
StartVectorOfReferrablesVectorMyGame.Example.Monster260   public static void StartVectorOfReferrablesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
AddSingleWeakReferenceMyGame.Example.Monster261   public static void AddSingleWeakReference(FlatBufferBuilder builder, ulong singleWeakReference) { builder.AddUlong(36, singleWeakReference, 0); }
AddVectorOfWeakReferencesMyGame.Example.Monster262   public static void AddVectorOfWeakReferences(FlatBufferBuilder builder, VectorOffset vectorOfWeakReferencesOffset) { builder.AddOffset(37, vectorOfWeakReferencesOffset.Value, 0); }
CreateVectorOfWeakReferencesVectorMyGame.Example.Monster263   public static VectorOffset CreateVectorOfWeakReferencesVector(FlatBufferBuilder builder, ulong[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddUlong(data[i]); return builder.EndVector(); }
CreateVectorOfWeakReferencesVectorBlockMyGame.Example.Monster264   public static VectorOffset CreateVectorOfWeakReferencesVectorBlock(FlatBufferBuilder builder, ulong[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
StartVectorOfWeakReferencesVectorMyGame.Example.Monster265   public static void StartVectorOfWeakReferencesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
AddVectorOfStrongReferrablesMyGame.Example.Monster266   public static void AddVectorOfStrongReferrables(FlatBufferBuilder builder, VectorOffset vectorOfStrongReferrablesOffset) { builder.AddOffset(38, vectorOfStrongReferrablesOffset.Value, 0); }
CreateVectorOfStrongReferrablesVectorMyGame.Example.Monster267   public static VectorOffset CreateVectorOfStrongReferrablesVector(FlatBufferBuilder builder, Offset<MyGame.Example.Referrable>[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
CreateVectorOfStrongReferrablesVectorBlockMyGame.Example.Monster268   public static VectorOffset CreateVectorOfStrongReferrablesVectorBlock(FlatBufferBuilder builder, Offset<MyGame.Example.Referrable>[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
StartVectorOfStrongReferrablesVectorMyGame.Example.Monster269   public static void StartVectorOfStrongReferrablesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
AddCoOwningReferenceMyGame.Example.Monster270   public static void AddCoOwningReference(FlatBufferBuilder builder, ulong coOwningReference) { builder.AddUlong(39, coOwningReference, 0); }
AddVectorOfCoOwningReferencesMyGame.Example.Monster271   public static void AddVectorOfCoOwningReferences(FlatBufferBuilder builder, VectorOffset vectorOfCoOwningReferencesOffset) { builder.AddOffset(40, vectorOfCoOwningReferencesOffset.Value, 0); }
CreateVectorOfCoOwningReferencesVectorMyGame.Example.Monster272   public static VectorOffset CreateVectorOfCoOwningReferencesVector(FlatBufferBuilder builder, ulong[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddUlong(data[i]); return builder.EndVector(); }
CreateVectorOfCoOwningReferencesVectorBlockMyGame.Example.Monster273   public static VectorOffset CreateVectorOfCoOwningReferencesVectorBlock(FlatBufferBuilder builder, ulong[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
StartVectorOfCoOwningReferencesVectorMyGame.Example.Monster274   public static void StartVectorOfCoOwningReferencesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
AddNonOwningReferenceMyGame.Example.Monster275   public static void AddNonOwningReference(FlatBufferBuilder builder, ulong nonOwningReference) { builder.AddUlong(41, nonOwningReference, 0); }
AddVectorOfNonOwningReferencesMyGame.Example.Monster276   public static void AddVectorOfNonOwningReferences(FlatBufferBuilder builder, VectorOffset vectorOfNonOwningReferencesOffset) { builder.AddOffset(42, vectorOfNonOwningReferencesOffset.Value, 0); }
CreateVectorOfNonOwningReferencesVectorMyGame.Example.Monster277   public static VectorOffset CreateVectorOfNonOwningReferencesVector(FlatBufferBuilder builder, ulong[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddUlong(data[i]); return builder.EndVector(); }
CreateVectorOfNonOwningReferencesVectorBlockMyGame.Example.Monster278   public static VectorOffset CreateVectorOfNonOwningReferencesVectorBlock(FlatBufferBuilder builder, ulong[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
StartVectorOfNonOwningReferencesVectorMyGame.Example.Monster279   public static void StartVectorOfNonOwningReferencesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
AddAnyUniqueTypeMyGame.Example.Monster280   public static void AddAnyUniqueType(FlatBufferBuilder builder, MyGame.Example.AnyUniqueAliases anyUniqueType) { builder.AddByte(43, (byte)anyUniqueType, 0); }
AddAnyUniqueMyGame.Example.Monster281   public static void AddAnyUnique(FlatBufferBuilder builder, int anyUniqueOffset) { builder.AddOffset(44, anyUniqueOffset, 0); }
AddAnyAmbiguousTypeMyGame.Example.Monster282   public static void AddAnyAmbiguousType(FlatBufferBuilder builder, MyGame.Example.AnyAmbiguousAliases anyAmbiguousType) { builder.AddByte(45, (byte)anyAmbiguousType, 0); }
AddAnyAmbiguousMyGame.Example.Monster283   public static void AddAnyAmbiguous(FlatBufferBuilder builder, int anyAmbiguousOffset) { builder.AddOffset(46, anyAmbiguousOffset, 0); }
AddVectorOfEnumsMyGame.Example.Monster284   public static void AddVectorOfEnums(FlatBufferBuilder builder, VectorOffset vectorOfEnumsOffset) { builder.AddOffset(47, vectorOfEnumsOffset.Value, 0); }
CreateVectorOfEnumsVectorMyGame.Example.Monster285   public static VectorOffset CreateVectorOfEnumsVector(FlatBufferBuilder builder, MyGame.Example.Color[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddByte((byte)data[i]); return builder.EndVector(); }
CreateVectorOfEnumsVectorBlockMyGame.Example.Monster286   public static VectorOffset CreateVectorOfEnumsVectorBlock(FlatBufferBuilder builder, MyGame.Example.Color[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); }
StartVectorOfEnumsVectorMyGame.Example.Monster287   public static void StartVectorOfEnumsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); }
AddSignedEnumMyGame.Example.Monster288   public static void AddSignedEnum(FlatBufferBuilder builder, MyGame.Example.Race signedEnum) { builder.AddSbyte(48, (sbyte)signedEnum, -1); }
EndMonsterMyGame.Example.Monster289   public static Offset<MyGame.Example.Monster> EndMonster(FlatBufferBuilder builder) {
290     int o = builder.EndTable();
291     builder.Required(o, 10);  // name
292     return new Offset<MyGame.Example.Monster>(o);
293   }
FinishMonsterBufferMyGame.Example.Monster294   public static void FinishMonsterBuffer(FlatBufferBuilder builder, Offset<MyGame.Example.Monster> offset) { builder.Finish(offset.Value, "MONS"); }
FinishSizePrefixedMonsterBufferMyGame.Example.Monster295   public static void FinishSizePrefixedMonsterBuffer(FlatBufferBuilder builder, Offset<MyGame.Example.Monster> offset) { builder.FinishSizePrefixed(offset.Value, "MONS"); }
296 
CreateSortedVectorOfMonsterMyGame.Example.Monster297   public static VectorOffset CreateSortedVectorOfMonster(FlatBufferBuilder builder, Offset<Monster>[] offsets) {
298     Array.Sort(offsets, (Offset<Monster> o1, Offset<Monster> o2) => Table.CompareStrings(Table.__offset(10, o1.Value, builder.DataBuffer), Table.__offset(10, o2.Value, builder.DataBuffer), builder.DataBuffer));
299     return builder.CreateVectorOfTables(offsets);
300   }
301 
__lookup_by_keyMyGame.Example.Monster302   public static Monster? __lookup_by_key(int vectorLocation, string key, ByteBuffer bb) {
303     byte[] byteKey = System.Text.Encoding.UTF8.GetBytes(key);
304     int span = bb.GetInt(vectorLocation - 4);
305     int start = 0;
306     while (span != 0) {
307       int middle = span / 2;
308       int tableOffset = Table.__indirect(vectorLocation + 4 * (start + middle), bb);
309       int comp = Table.CompareStrings(Table.__offset(10, bb.Length - tableOffset, bb), byteKey, bb);
310       if (comp > 0) {
311         span = middle;
312       } else if (comp < 0) {
313         middle++;
314         start += middle;
315         span -= middle;
316       } else {
317         return new Monster().__assign(tableOffset, bb);
318       }
319     }
320     return null;
321   }
UnPackMyGame.Example.Monster322   public MonsterT UnPack() {
323     var _o = new MonsterT();
324     this.UnPackTo(_o);
325     return _o;
326   }
UnPackToMyGame.Example.Monster327   public void UnPackTo(MonsterT _o) {
328     _o.Pos = this.Pos.HasValue ? this.Pos.Value.UnPack() : null;
329     _o.Mana = this.Mana;
330     _o.Hp = this.Hp;
331     _o.Name = this.Name;
332     _o.Inventory = new List<byte>();
333     for (var _j = 0; _j < this.InventoryLength; ++_j) {_o.Inventory.Add(this.Inventory(_j));}
334     _o.Color = this.Color;
335     _o.Test = new MyGame.Example.AnyUnion();
336     _o.Test.Type = this.TestType;
337     switch (this.TestType) {
338       default: break;
339       case MyGame.Example.Any.Monster:
340         _o.Test.Value = this.Test<MyGame.Example.Monster>().HasValue ? this.Test<MyGame.Example.Monster>().Value.UnPack() : null;
341         break;
342       case MyGame.Example.Any.TestSimpleTableWithEnum:
343         _o.Test.Value = this.Test<MyGame.Example.TestSimpleTableWithEnum>().HasValue ? this.Test<MyGame.Example.TestSimpleTableWithEnum>().Value.UnPack() : null;
344         break;
345       case MyGame.Example.Any.MyGame_Example2_Monster:
346         _o.Test.Value = this.Test<MyGame.Example2.Monster>().HasValue ? this.Test<MyGame.Example2.Monster>().Value.UnPack() : null;
347         break;
348     }
349     _o.Test4 = new List<MyGame.Example.TestT>();
350     for (var _j = 0; _j < this.Test4Length; ++_j) {_o.Test4.Add(this.Test4(_j).HasValue ? this.Test4(_j).Value.UnPack() : null);}
351     _o.Testarrayofstring = new List<string>();
352     for (var _j = 0; _j < this.TestarrayofstringLength; ++_j) {_o.Testarrayofstring.Add(this.Testarrayofstring(_j));}
353     _o.Testarrayoftables = new List<MyGame.Example.MonsterT>();
354     for (var _j = 0; _j < this.TestarrayoftablesLength; ++_j) {_o.Testarrayoftables.Add(this.Testarrayoftables(_j).HasValue ? this.Testarrayoftables(_j).Value.UnPack() : null);}
355     _o.Enemy = this.Enemy.HasValue ? this.Enemy.Value.UnPack() : null;
356     _o.Testnestedflatbuffer = new List<byte>();
357     for (var _j = 0; _j < this.TestnestedflatbufferLength; ++_j) {_o.Testnestedflatbuffer.Add(this.Testnestedflatbuffer(_j));}
358     _o.Testempty = this.Testempty.HasValue ? this.Testempty.Value.UnPack() : null;
359     _o.Testbool = this.Testbool;
360     _o.Testhashs32Fnv1 = this.Testhashs32Fnv1;
361     _o.Testhashu32Fnv1 = this.Testhashu32Fnv1;
362     _o.Testhashs64Fnv1 = this.Testhashs64Fnv1;
363     _o.Testhashu64Fnv1 = this.Testhashu64Fnv1;
364     _o.Testhashs32Fnv1a = this.Testhashs32Fnv1a;
365     _o.Testhashu32Fnv1a = this.Testhashu32Fnv1a;
366     _o.Testhashs64Fnv1a = this.Testhashs64Fnv1a;
367     _o.Testhashu64Fnv1a = this.Testhashu64Fnv1a;
368     _o.Testarrayofbools = new List<bool>();
369     for (var _j = 0; _j < this.TestarrayofboolsLength; ++_j) {_o.Testarrayofbools.Add(this.Testarrayofbools(_j));}
370     _o.Testf = this.Testf;
371     _o.Testf2 = this.Testf2;
372     _o.Testf3 = this.Testf3;
373     _o.Testarrayofstring2 = new List<string>();
374     for (var _j = 0; _j < this.Testarrayofstring2Length; ++_j) {_o.Testarrayofstring2.Add(this.Testarrayofstring2(_j));}
375     _o.Testarrayofsortedstruct = new List<MyGame.Example.AbilityT>();
376     for (var _j = 0; _j < this.TestarrayofsortedstructLength; ++_j) {_o.Testarrayofsortedstruct.Add(this.Testarrayofsortedstruct(_j).HasValue ? this.Testarrayofsortedstruct(_j).Value.UnPack() : null);}
377     _o.Flex = new List<byte>();
378     for (var _j = 0; _j < this.FlexLength; ++_j) {_o.Flex.Add(this.Flex(_j));}
379     _o.Test5 = new List<MyGame.Example.TestT>();
380     for (var _j = 0; _j < this.Test5Length; ++_j) {_o.Test5.Add(this.Test5(_j).HasValue ? this.Test5(_j).Value.UnPack() : null);}
381     _o.VectorOfLongs = new List<long>();
382     for (var _j = 0; _j < this.VectorOfLongsLength; ++_j) {_o.VectorOfLongs.Add(this.VectorOfLongs(_j));}
383     _o.VectorOfDoubles = new List<double>();
384     for (var _j = 0; _j < this.VectorOfDoublesLength; ++_j) {_o.VectorOfDoubles.Add(this.VectorOfDoubles(_j));}
385     _o.ParentNamespaceTest = this.ParentNamespaceTest.HasValue ? this.ParentNamespaceTest.Value.UnPack() : null;
386     _o.VectorOfReferrables = new List<MyGame.Example.ReferrableT>();
387     for (var _j = 0; _j < this.VectorOfReferrablesLength; ++_j) {_o.VectorOfReferrables.Add(this.VectorOfReferrables(_j).HasValue ? this.VectorOfReferrables(_j).Value.UnPack() : null);}
388     _o.SingleWeakReference = this.SingleWeakReference;
389     _o.VectorOfWeakReferences = new List<ulong>();
390     for (var _j = 0; _j < this.VectorOfWeakReferencesLength; ++_j) {_o.VectorOfWeakReferences.Add(this.VectorOfWeakReferences(_j));}
391     _o.VectorOfStrongReferrables = new List<MyGame.Example.ReferrableT>();
392     for (var _j = 0; _j < this.VectorOfStrongReferrablesLength; ++_j) {_o.VectorOfStrongReferrables.Add(this.VectorOfStrongReferrables(_j).HasValue ? this.VectorOfStrongReferrables(_j).Value.UnPack() : null);}
393     _o.CoOwningReference = this.CoOwningReference;
394     _o.VectorOfCoOwningReferences = new List<ulong>();
395     for (var _j = 0; _j < this.VectorOfCoOwningReferencesLength; ++_j) {_o.VectorOfCoOwningReferences.Add(this.VectorOfCoOwningReferences(_j));}
396     _o.NonOwningReference = this.NonOwningReference;
397     _o.VectorOfNonOwningReferences = new List<ulong>();
398     for (var _j = 0; _j < this.VectorOfNonOwningReferencesLength; ++_j) {_o.VectorOfNonOwningReferences.Add(this.VectorOfNonOwningReferences(_j));}
399     _o.AnyUnique = new MyGame.Example.AnyUniqueAliasesUnion();
400     _o.AnyUnique.Type = this.AnyUniqueType;
401     switch (this.AnyUniqueType) {
402       default: break;
403       case MyGame.Example.AnyUniqueAliases.M:
404         _o.AnyUnique.Value = this.AnyUnique<MyGame.Example.Monster>().HasValue ? this.AnyUnique<MyGame.Example.Monster>().Value.UnPack() : null;
405         break;
406       case MyGame.Example.AnyUniqueAliases.TS:
407         _o.AnyUnique.Value = this.AnyUnique<MyGame.Example.TestSimpleTableWithEnum>().HasValue ? this.AnyUnique<MyGame.Example.TestSimpleTableWithEnum>().Value.UnPack() : null;
408         break;
409       case MyGame.Example.AnyUniqueAliases.M2:
410         _o.AnyUnique.Value = this.AnyUnique<MyGame.Example2.Monster>().HasValue ? this.AnyUnique<MyGame.Example2.Monster>().Value.UnPack() : null;
411         break;
412     }
413     _o.AnyAmbiguous = new MyGame.Example.AnyAmbiguousAliasesUnion();
414     _o.AnyAmbiguous.Type = this.AnyAmbiguousType;
415     switch (this.AnyAmbiguousType) {
416       default: break;
417       case MyGame.Example.AnyAmbiguousAliases.M1:
418         _o.AnyAmbiguous.Value = this.AnyAmbiguous<MyGame.Example.Monster>().HasValue ? this.AnyAmbiguous<MyGame.Example.Monster>().Value.UnPack() : null;
419         break;
420       case MyGame.Example.AnyAmbiguousAliases.M2:
421         _o.AnyAmbiguous.Value = this.AnyAmbiguous<MyGame.Example.Monster>().HasValue ? this.AnyAmbiguous<MyGame.Example.Monster>().Value.UnPack() : null;
422         break;
423       case MyGame.Example.AnyAmbiguousAliases.M3:
424         _o.AnyAmbiguous.Value = this.AnyAmbiguous<MyGame.Example.Monster>().HasValue ? this.AnyAmbiguous<MyGame.Example.Monster>().Value.UnPack() : null;
425         break;
426     }
427     _o.VectorOfEnums = new List<MyGame.Example.Color>();
428     for (var _j = 0; _j < this.VectorOfEnumsLength; ++_j) {_o.VectorOfEnums.Add(this.VectorOfEnums(_j));}
429     _o.SignedEnum = this.SignedEnum;
430   }
PackMyGame.Example.Monster431   public static Offset<MyGame.Example.Monster> Pack(FlatBufferBuilder builder, MonsterT _o) {
432     if (_o == null) return default(Offset<MyGame.Example.Monster>);
433     var _name = _o.Name == null ? default(StringOffset) : builder.CreateString(_o.Name);
434     var _inventory = default(VectorOffset);
435     if (_o.Inventory != null) {
436       var __inventory = _o.Inventory.ToArray();
437       _inventory = CreateInventoryVector(builder, __inventory);
438     }
439     var _test_type = _o.Test == null ? MyGame.Example.Any.NONE : _o.Test.Type;
440     var _test = _o.Test == null ? 0 : MyGame.Example.AnyUnion.Pack(builder, _o.Test);
441     var _test4 = default(VectorOffset);
442     if (_o.Test4 != null) {
443       StartTest4Vector(builder, _o.Test4.Count);
444       for (var _j = _o.Test4.Count - 1; _j >= 0; --_j) { MyGame.Example.Test.Pack(builder, _o.Test4[_j]); }
445       _test4 = builder.EndVector();
446     }
447     var _testarrayofstring = default(VectorOffset);
448     if (_o.Testarrayofstring != null) {
449       var __testarrayofstring = new StringOffset[_o.Testarrayofstring.Count];
450       for (var _j = 0; _j < __testarrayofstring.Length; ++_j) { __testarrayofstring[_j] = builder.CreateString(_o.Testarrayofstring[_j]); }
451       _testarrayofstring = CreateTestarrayofstringVector(builder, __testarrayofstring);
452     }
453     var _testarrayoftables = default(VectorOffset);
454     if (_o.Testarrayoftables != null) {
455       var __testarrayoftables = new Offset<MyGame.Example.Monster>[_o.Testarrayoftables.Count];
456       for (var _j = 0; _j < __testarrayoftables.Length; ++_j) { __testarrayoftables[_j] = MyGame.Example.Monster.Pack(builder, _o.Testarrayoftables[_j]); }
457       _testarrayoftables = CreateTestarrayoftablesVector(builder, __testarrayoftables);
458     }
459     var _enemy = _o.Enemy == null ? default(Offset<MyGame.Example.Monster>) : MyGame.Example.Monster.Pack(builder, _o.Enemy);
460     var _testnestedflatbuffer = default(VectorOffset);
461     if (_o.Testnestedflatbuffer != null) {
462       var __testnestedflatbuffer = _o.Testnestedflatbuffer.ToArray();
463       _testnestedflatbuffer = CreateTestnestedflatbufferVector(builder, __testnestedflatbuffer);
464     }
465     var _testempty = _o.Testempty == null ? default(Offset<MyGame.Example.Stat>) : MyGame.Example.Stat.Pack(builder, _o.Testempty);
466     var _testarrayofbools = default(VectorOffset);
467     if (_o.Testarrayofbools != null) {
468       var __testarrayofbools = _o.Testarrayofbools.ToArray();
469       _testarrayofbools = CreateTestarrayofboolsVector(builder, __testarrayofbools);
470     }
471     var _testarrayofstring2 = default(VectorOffset);
472     if (_o.Testarrayofstring2 != null) {
473       var __testarrayofstring2 = new StringOffset[_o.Testarrayofstring2.Count];
474       for (var _j = 0; _j < __testarrayofstring2.Length; ++_j) { __testarrayofstring2[_j] = builder.CreateString(_o.Testarrayofstring2[_j]); }
475       _testarrayofstring2 = CreateTestarrayofstring2Vector(builder, __testarrayofstring2);
476     }
477     var _testarrayofsortedstruct = default(VectorOffset);
478     if (_o.Testarrayofsortedstruct != null) {
479       StartTestarrayofsortedstructVector(builder, _o.Testarrayofsortedstruct.Count);
480       for (var _j = _o.Testarrayofsortedstruct.Count - 1; _j >= 0; --_j) { MyGame.Example.Ability.Pack(builder, _o.Testarrayofsortedstruct[_j]); }
481       _testarrayofsortedstruct = builder.EndVector();
482     }
483     var _flex = default(VectorOffset);
484     if (_o.Flex != null) {
485       var __flex = _o.Flex.ToArray();
486       _flex = CreateFlexVector(builder, __flex);
487     }
488     var _test5 = default(VectorOffset);
489     if (_o.Test5 != null) {
490       StartTest5Vector(builder, _o.Test5.Count);
491       for (var _j = _o.Test5.Count - 1; _j >= 0; --_j) { MyGame.Example.Test.Pack(builder, _o.Test5[_j]); }
492       _test5 = builder.EndVector();
493     }
494     var _vector_of_longs = default(VectorOffset);
495     if (_o.VectorOfLongs != null) {
496       var __vector_of_longs = _o.VectorOfLongs.ToArray();
497       _vector_of_longs = CreateVectorOfLongsVector(builder, __vector_of_longs);
498     }
499     var _vector_of_doubles = default(VectorOffset);
500     if (_o.VectorOfDoubles != null) {
501       var __vector_of_doubles = _o.VectorOfDoubles.ToArray();
502       _vector_of_doubles = CreateVectorOfDoublesVector(builder, __vector_of_doubles);
503     }
504     var _parent_namespace_test = _o.ParentNamespaceTest == null ? default(Offset<MyGame.InParentNamespace>) : MyGame.InParentNamespace.Pack(builder, _o.ParentNamespaceTest);
505     var _vector_of_referrables = default(VectorOffset);
506     if (_o.VectorOfReferrables != null) {
507       var __vector_of_referrables = new Offset<MyGame.Example.Referrable>[_o.VectorOfReferrables.Count];
508       for (var _j = 0; _j < __vector_of_referrables.Length; ++_j) { __vector_of_referrables[_j] = MyGame.Example.Referrable.Pack(builder, _o.VectorOfReferrables[_j]); }
509       _vector_of_referrables = CreateVectorOfReferrablesVector(builder, __vector_of_referrables);
510     }
511     var _vector_of_weak_references = default(VectorOffset);
512     if (_o.VectorOfWeakReferences != null) {
513       var __vector_of_weak_references = _o.VectorOfWeakReferences.ToArray();
514       _vector_of_weak_references = CreateVectorOfWeakReferencesVector(builder, __vector_of_weak_references);
515     }
516     var _vector_of_strong_referrables = default(VectorOffset);
517     if (_o.VectorOfStrongReferrables != null) {
518       var __vector_of_strong_referrables = new Offset<MyGame.Example.Referrable>[_o.VectorOfStrongReferrables.Count];
519       for (var _j = 0; _j < __vector_of_strong_referrables.Length; ++_j) { __vector_of_strong_referrables[_j] = MyGame.Example.Referrable.Pack(builder, _o.VectorOfStrongReferrables[_j]); }
520       _vector_of_strong_referrables = CreateVectorOfStrongReferrablesVector(builder, __vector_of_strong_referrables);
521     }
522     var _vector_of_co_owning_references = default(VectorOffset);
523     if (_o.VectorOfCoOwningReferences != null) {
524       var __vector_of_co_owning_references = _o.VectorOfCoOwningReferences.ToArray();
525       _vector_of_co_owning_references = CreateVectorOfCoOwningReferencesVector(builder, __vector_of_co_owning_references);
526     }
527     var _vector_of_non_owning_references = default(VectorOffset);
528     if (_o.VectorOfNonOwningReferences != null) {
529       var __vector_of_non_owning_references = _o.VectorOfNonOwningReferences.ToArray();
530       _vector_of_non_owning_references = CreateVectorOfNonOwningReferencesVector(builder, __vector_of_non_owning_references);
531     }
532     var _any_unique_type = _o.AnyUnique == null ? MyGame.Example.AnyUniqueAliases.NONE : _o.AnyUnique.Type;
533     var _any_unique = _o.AnyUnique == null ? 0 : MyGame.Example.AnyUniqueAliasesUnion.Pack(builder, _o.AnyUnique);
534     var _any_ambiguous_type = _o.AnyAmbiguous == null ? MyGame.Example.AnyAmbiguousAliases.NONE : _o.AnyAmbiguous.Type;
535     var _any_ambiguous = _o.AnyAmbiguous == null ? 0 : MyGame.Example.AnyAmbiguousAliasesUnion.Pack(builder, _o.AnyAmbiguous);
536     var _vector_of_enums = default(VectorOffset);
537     if (_o.VectorOfEnums != null) {
538       var __vector_of_enums = _o.VectorOfEnums.ToArray();
539       _vector_of_enums = CreateVectorOfEnumsVector(builder, __vector_of_enums);
540     }
541     StartMonster(builder);
542     AddPos(builder, MyGame.Example.Vec3.Pack(builder, _o.Pos));
543     AddMana(builder, _o.Mana);
544     AddHp(builder, _o.Hp);
545     AddName(builder, _name);
546     AddInventory(builder, _inventory);
547     AddColor(builder, _o.Color);
548     AddTestType(builder, _test_type);
549     AddTest(builder, _test);
550     AddTest4(builder, _test4);
551     AddTestarrayofstring(builder, _testarrayofstring);
552     AddTestarrayoftables(builder, _testarrayoftables);
553     AddEnemy(builder, _enemy);
554     AddTestnestedflatbuffer(builder, _testnestedflatbuffer);
555     AddTestempty(builder, _testempty);
556     AddTestbool(builder, _o.Testbool);
557     AddTesthashs32Fnv1(builder, _o.Testhashs32Fnv1);
558     AddTesthashu32Fnv1(builder, _o.Testhashu32Fnv1);
559     AddTesthashs64Fnv1(builder, _o.Testhashs64Fnv1);
560     AddTesthashu64Fnv1(builder, _o.Testhashu64Fnv1);
561     AddTesthashs32Fnv1a(builder, _o.Testhashs32Fnv1a);
562     AddTesthashu32Fnv1a(builder, _o.Testhashu32Fnv1a);
563     AddTesthashs64Fnv1a(builder, _o.Testhashs64Fnv1a);
564     AddTesthashu64Fnv1a(builder, _o.Testhashu64Fnv1a);
565     AddTestarrayofbools(builder, _testarrayofbools);
566     AddTestf(builder, _o.Testf);
567     AddTestf2(builder, _o.Testf2);
568     AddTestf3(builder, _o.Testf3);
569     AddTestarrayofstring2(builder, _testarrayofstring2);
570     AddTestarrayofsortedstruct(builder, _testarrayofsortedstruct);
571     AddFlex(builder, _flex);
572     AddTest5(builder, _test5);
573     AddVectorOfLongs(builder, _vector_of_longs);
574     AddVectorOfDoubles(builder, _vector_of_doubles);
575     AddParentNamespaceTest(builder, _parent_namespace_test);
576     AddVectorOfReferrables(builder, _vector_of_referrables);
577     AddSingleWeakReference(builder, _o.SingleWeakReference);
578     AddVectorOfWeakReferences(builder, _vector_of_weak_references);
579     AddVectorOfStrongReferrables(builder, _vector_of_strong_referrables);
580     AddCoOwningReference(builder, _o.CoOwningReference);
581     AddVectorOfCoOwningReferences(builder, _vector_of_co_owning_references);
582     AddNonOwningReference(builder, _o.NonOwningReference);
583     AddVectorOfNonOwningReferences(builder, _vector_of_non_owning_references);
584     AddAnyUniqueType(builder, _any_unique_type);
585     AddAnyUnique(builder, _any_unique);
586     AddAnyAmbiguousType(builder, _any_ambiguous_type);
587     AddAnyAmbiguous(builder, _any_ambiguous);
588     AddVectorOfEnums(builder, _vector_of_enums);
589     AddSignedEnum(builder, _o.SignedEnum);
590     return EndMonster(builder);
591   }
592 };
593 
594 public class MonsterT
595 {
596   [Newtonsoft.Json.JsonProperty("pos")]
597   public MyGame.Example.Vec3T Pos { get; set; }
598   [Newtonsoft.Json.JsonProperty("mana")]
599   public short Mana { get; set; }
600   [Newtonsoft.Json.JsonProperty("hp")]
601   public short Hp { get; set; }
602   [Newtonsoft.Json.JsonProperty("name")]
603   public string Name { get; set; }
604   [Newtonsoft.Json.JsonProperty("inventory")]
605   public List<byte> Inventory { get; set; }
606   [Newtonsoft.Json.JsonProperty("color")]
607   public MyGame.Example.Color Color { get; set; }
608   [Newtonsoft.Json.JsonProperty("test_type")]
609   private MyGame.Example.Any TestType {
610     get {
611       return this.Test != null ? this.Test.Type : MyGame.Example.Any.NONE;
612     }
613     set {
614       this.Test = new MyGame.Example.AnyUnion();
615       this.Test.Type = value;
616     }
617   }
618   [Newtonsoft.Json.JsonProperty("test")]
619   [Newtonsoft.Json.JsonConverter(typeof(MyGame.Example.AnyUnion_JsonConverter))]
620   public MyGame.Example.AnyUnion Test { get; set; }
621   [Newtonsoft.Json.JsonProperty("test4")]
622   public List<MyGame.Example.TestT> Test4 { get; set; }
623   [Newtonsoft.Json.JsonProperty("testarrayofstring")]
624   public List<string> Testarrayofstring { get; set; }
625   [Newtonsoft.Json.JsonProperty("testarrayoftables")]
626   public List<MyGame.Example.MonsterT> Testarrayoftables { get; set; }
627   [Newtonsoft.Json.JsonProperty("enemy")]
628   public MyGame.Example.MonsterT Enemy { get; set; }
629   [Newtonsoft.Json.JsonProperty("testnestedflatbuffer")]
630   public List<byte> Testnestedflatbuffer { get; set; }
631   [Newtonsoft.Json.JsonProperty("testempty")]
632   public MyGame.Example.StatT Testempty { get; set; }
633   [Newtonsoft.Json.JsonProperty("testbool")]
634   public bool Testbool { get; set; }
635   [Newtonsoft.Json.JsonProperty("testhashs32_fnv1")]
636   [Newtonsoft.Json.JsonIgnore()]
637   public int Testhashs32Fnv1 { get; set; }
638   [Newtonsoft.Json.JsonProperty("testhashu32_fnv1")]
639   [Newtonsoft.Json.JsonIgnore()]
640   public uint Testhashu32Fnv1 { get; set; }
641   [Newtonsoft.Json.JsonProperty("testhashs64_fnv1")]
642   [Newtonsoft.Json.JsonIgnore()]
643   public long Testhashs64Fnv1 { get; set; }
644   [Newtonsoft.Json.JsonProperty("testhashu64_fnv1")]
645   [Newtonsoft.Json.JsonIgnore()]
646   public ulong Testhashu64Fnv1 { get; set; }
647   [Newtonsoft.Json.JsonProperty("testhashs32_fnv1a")]
648   [Newtonsoft.Json.JsonIgnore()]
649   public int Testhashs32Fnv1a { get; set; }
650   [Newtonsoft.Json.JsonProperty("testhashu32_fnv1a")]
651   [Newtonsoft.Json.JsonIgnore()]
652   public uint Testhashu32Fnv1a { get; set; }
653   [Newtonsoft.Json.JsonProperty("testhashs64_fnv1a")]
654   [Newtonsoft.Json.JsonIgnore()]
655   public long Testhashs64Fnv1a { get; set; }
656   [Newtonsoft.Json.JsonProperty("testhashu64_fnv1a")]
657   [Newtonsoft.Json.JsonIgnore()]
658   public ulong Testhashu64Fnv1a { get; set; }
659   [Newtonsoft.Json.JsonProperty("testarrayofbools")]
660   public List<bool> Testarrayofbools { get; set; }
661   [Newtonsoft.Json.JsonProperty("testf")]
662   public float Testf { get; set; }
663   [Newtonsoft.Json.JsonProperty("testf2")]
664   public float Testf2 { get; set; }
665   [Newtonsoft.Json.JsonProperty("testf3")]
666   public float Testf3 { get; set; }
667   [Newtonsoft.Json.JsonProperty("testarrayofstring2")]
668   public List<string> Testarrayofstring2 { get; set; }
669   [Newtonsoft.Json.JsonProperty("testarrayofsortedstruct")]
670   public List<MyGame.Example.AbilityT> Testarrayofsortedstruct { get; set; }
671   [Newtonsoft.Json.JsonProperty("flex")]
672   public List<byte> Flex { get; set; }
673   [Newtonsoft.Json.JsonProperty("test5")]
674   public List<MyGame.Example.TestT> Test5 { get; set; }
675   [Newtonsoft.Json.JsonProperty("vector_of_longs")]
676   public List<long> VectorOfLongs { get; set; }
677   [Newtonsoft.Json.JsonProperty("vector_of_doubles")]
678   public List<double> VectorOfDoubles { get; set; }
679   [Newtonsoft.Json.JsonProperty("parent_namespace_test")]
680   public MyGame.InParentNamespaceT ParentNamespaceTest { get; set; }
681   [Newtonsoft.Json.JsonProperty("vector_of_referrables")]
682   public List<MyGame.Example.ReferrableT> VectorOfReferrables { get; set; }
683   [Newtonsoft.Json.JsonProperty("single_weak_reference")]
684   [Newtonsoft.Json.JsonIgnore()]
685   public ulong SingleWeakReference { get; set; }
686   [Newtonsoft.Json.JsonProperty("vector_of_weak_references")]
687   [Newtonsoft.Json.JsonIgnore()]
688   public List<ulong> VectorOfWeakReferences { get; set; }
689   [Newtonsoft.Json.JsonProperty("vector_of_strong_referrables")]
690   public List<MyGame.Example.ReferrableT> VectorOfStrongReferrables { get; set; }
691   [Newtonsoft.Json.JsonProperty("co_owning_reference")]
692   [Newtonsoft.Json.JsonIgnore()]
693   public ulong CoOwningReference { get; set; }
694   [Newtonsoft.Json.JsonProperty("vector_of_co_owning_references")]
695   [Newtonsoft.Json.JsonIgnore()]
696   public List<ulong> VectorOfCoOwningReferences { get; set; }
697   [Newtonsoft.Json.JsonProperty("non_owning_reference")]
698   [Newtonsoft.Json.JsonIgnore()]
699   public ulong NonOwningReference { get; set; }
700   [Newtonsoft.Json.JsonProperty("vector_of_non_owning_references")]
701   [Newtonsoft.Json.JsonIgnore()]
702   public List<ulong> VectorOfNonOwningReferences { get; set; }
703   [Newtonsoft.Json.JsonProperty("any_unique_type")]
704   private MyGame.Example.AnyUniqueAliases AnyUniqueType {
705     get {
706       return this.AnyUnique != null ? this.AnyUnique.Type : MyGame.Example.AnyUniqueAliases.NONE;
707     }
708     set {
709       this.AnyUnique = new MyGame.Example.AnyUniqueAliasesUnion();
710       this.AnyUnique.Type = value;
711     }
712   }
713   [Newtonsoft.Json.JsonProperty("any_unique")]
714   [Newtonsoft.Json.JsonConverter(typeof(MyGame.Example.AnyUniqueAliasesUnion_JsonConverter))]
715   public MyGame.Example.AnyUniqueAliasesUnion AnyUnique { get; set; }
716   [Newtonsoft.Json.JsonProperty("any_ambiguous_type")]
717   private MyGame.Example.AnyAmbiguousAliases AnyAmbiguousType {
718     get {
719       return this.AnyAmbiguous != null ? this.AnyAmbiguous.Type : MyGame.Example.AnyAmbiguousAliases.NONE;
720     }
721     set {
722       this.AnyAmbiguous = new MyGame.Example.AnyAmbiguousAliasesUnion();
723       this.AnyAmbiguous.Type = value;
724     }
725   }
726   [Newtonsoft.Json.JsonProperty("any_ambiguous")]
727   [Newtonsoft.Json.JsonConverter(typeof(MyGame.Example.AnyAmbiguousAliasesUnion_JsonConverter))]
728   public MyGame.Example.AnyAmbiguousAliasesUnion AnyAmbiguous { get; set; }
729   [Newtonsoft.Json.JsonProperty("vector_of_enums")]
730   public List<MyGame.Example.Color> VectorOfEnums { get; set; }
731   [Newtonsoft.Json.JsonProperty("signed_enum")]
732   public MyGame.Example.Race SignedEnum { get; set; }
733 
MonsterT()734   public MonsterT() {
735     this.Pos = new MyGame.Example.Vec3T();
736     this.Mana = 150;
737     this.Hp = 100;
738     this.Name = null;
739     this.Inventory = null;
740     this.Color = MyGame.Example.Color.Blue;
741     this.Test = null;
742     this.Test4 = null;
743     this.Testarrayofstring = null;
744     this.Testarrayoftables = null;
745     this.Enemy = null;
746     this.Testnestedflatbuffer = null;
747     this.Testempty = null;
748     this.Testbool = false;
749     this.Testhashs32Fnv1 = 0;
750     this.Testhashu32Fnv1 = 0;
751     this.Testhashs64Fnv1 = 0;
752     this.Testhashu64Fnv1 = 0;
753     this.Testhashs32Fnv1a = 0;
754     this.Testhashu32Fnv1a = 0;
755     this.Testhashs64Fnv1a = 0;
756     this.Testhashu64Fnv1a = 0;
757     this.Testarrayofbools = null;
758     this.Testf = 3.14159f;
759     this.Testf2 = 3.0f;
760     this.Testf3 = 0.0f;
761     this.Testarrayofstring2 = null;
762     this.Testarrayofsortedstruct = null;
763     this.Flex = null;
764     this.Test5 = null;
765     this.VectorOfLongs = null;
766     this.VectorOfDoubles = null;
767     this.ParentNamespaceTest = null;
768     this.VectorOfReferrables = null;
769     this.SingleWeakReference = 0;
770     this.VectorOfWeakReferences = null;
771     this.VectorOfStrongReferrables = null;
772     this.CoOwningReference = 0;
773     this.VectorOfCoOwningReferences = null;
774     this.NonOwningReference = 0;
775     this.VectorOfNonOwningReferences = null;
776     this.AnyUnique = null;
777     this.AnyAmbiguous = null;
778     this.VectorOfEnums = null;
779     this.SignedEnum = MyGame.Example.Race.None;
780   }
781 
DeserializeFromJson(string jsonText)782   public static MonsterT DeserializeFromJson(string jsonText) {
783     return Newtonsoft.Json.JsonConvert.DeserializeObject<MonsterT>(jsonText);
784   }
SerializeToJson()785   public string SerializeToJson() {
786     return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
787   }
DeserializeFromBinary(byte[] fbBuffer)788   public static MonsterT DeserializeFromBinary(byte[] fbBuffer) {
789     return Monster.GetRootAsMonster(new ByteBuffer(fbBuffer)).UnPack();
790   }
SerializeToBinary()791   public byte[] SerializeToBinary() {
792     var fbb = new FlatBufferBuilder(0x10000);
793     fbb.Finish(Monster.Pack(fbb, this).Value);
794     return fbb.DataBuffer.ToSizedArray();
795   }
796 }
797 
798 
799 }
800