• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 // swiftlint:disable all
3 // swiftformat:disable all
4 
5 import FlatBuffers
6 
7 ///  Composite components of Monster color.
8 public enum MyGame_Example_Color: UInt8, Enum {
9   public typealias T = UInt8
10   public static var byteSize: Int { return MemoryLayout<UInt8>.size }
11   public var value: UInt8 { return self.rawValue }
12   case red = 1
13   ///  \brief color Green
14   ///  Green is bit_flag with value (1u << 1)
15   case green = 2
16   ///  \brief color Blue (1u << 3)
17   case blue = 8
18 
19 
20   public static var max: MyGame_Example_Color { return .blue }
21   public static var min: MyGame_Example_Color { return .red }
22 }
23 
24 public enum MyGame_Example_Race: Int8, Enum {
25   public typealias T = Int8
26   public static var byteSize: Int { return MemoryLayout<Int8>.size }
27   public var value: Int8 { return self.rawValue }
28   case none_ = -1
29   case human = 0
30   case dwarf = 1
31   case elf = 2
32 
33 
34   public static var max: MyGame_Example_Race { return .elf }
35   public static var min: MyGame_Example_Race { return .none_ }
36 }
37 
38 public enum MyGame_Example_Any_: UInt8, Enum {
39   public typealias T = UInt8
40   public static var byteSize: Int { return MemoryLayout<UInt8>.size }
41   public var value: UInt8 { return self.rawValue }
42   case none_ = 0
43   case monster = 1
44   case testsimpletablewithenum = 2
45   case mygameExample2Monster = 3
46 
47 
48   public static var max: MyGame_Example_Any_ { return .mygameExample2Monster }
49   public static var min: MyGame_Example_Any_ { return .none_ }
50 }
51 
52 public struct MyGame_Example_Any_Union {
53   public var type: MyGame_Example_Any_
54   public var value: NativeObject?
55   public init(_ v: NativeObject?, type: MyGame_Example_Any_) {
56     self.type = type
57     self.value = v
58   }
packnull59   public func pack(builder: inout FlatBufferBuilder) -> Offset {
60     switch type {
61     case .monster:
62       var __obj = value as? MyGame_Example_MonsterT
63       return MyGame_Example_Monster.pack(&builder, obj: &__obj)
64     case .testsimpletablewithenum:
65       var __obj = value as? MyGame_Example_TestSimpleTableWithEnumT
66       return MyGame_Example_TestSimpleTableWithEnum.pack(&builder, obj: &__obj)
67     case .mygameExample2Monster:
68       var __obj = value as? MyGame_Example2_MonsterT
69       return MyGame_Example2_Monster.pack(&builder, obj: &__obj)
70     default: return Offset()
71     }
72   }
73 }
74 public enum MyGame_Example_AnyUniqueAliases: UInt8, Enum {
75   public typealias T = UInt8
76   public static var byteSize: Int { return MemoryLayout<UInt8>.size }
77   public var value: UInt8 { return self.rawValue }
78   case none_ = 0
79   case m = 1
80   case ts = 2
81   case m2 = 3
82 
83 
84   public static var max: MyGame_Example_AnyUniqueAliases { return .m2 }
85   public static var min: MyGame_Example_AnyUniqueAliases { return .none_ }
86 }
87 
88 public struct MyGame_Example_AnyUniqueAliasesUnion {
89   public var type: MyGame_Example_AnyUniqueAliases
90   public var value: NativeObject?
91   public init(_ v: NativeObject?, type: MyGame_Example_AnyUniqueAliases) {
92     self.type = type
93     self.value = v
94   }
packnull95   public func pack(builder: inout FlatBufferBuilder) -> Offset {
96     switch type {
97     case .m:
98       var __obj = value as? MyGame_Example_MonsterT
99       return MyGame_Example_Monster.pack(&builder, obj: &__obj)
100     case .ts:
101       var __obj = value as? MyGame_Example_TestSimpleTableWithEnumT
102       return MyGame_Example_TestSimpleTableWithEnum.pack(&builder, obj: &__obj)
103     case .m2:
104       var __obj = value as? MyGame_Example2_MonsterT
105       return MyGame_Example2_Monster.pack(&builder, obj: &__obj)
106     default: return Offset()
107     }
108   }
109 }
110 public enum MyGame_Example_AnyAmbiguousAliases: UInt8, Enum {
111   public typealias T = UInt8
112   public static var byteSize: Int { return MemoryLayout<UInt8>.size }
113   public var value: UInt8 { return self.rawValue }
114   case none_ = 0
115   case m1 = 1
116   case m2 = 2
117   case m3 = 3
118 
119 
120   public static var max: MyGame_Example_AnyAmbiguousAliases { return .m3 }
121   public static var min: MyGame_Example_AnyAmbiguousAliases { return .none_ }
122 }
123 
124 public struct MyGame_Example_AnyAmbiguousAliasesUnion {
125   public var type: MyGame_Example_AnyAmbiguousAliases
126   public var value: NativeObject?
127   public init(_ v: NativeObject?, type: MyGame_Example_AnyAmbiguousAliases) {
128     self.type = type
129     self.value = v
130   }
packnull131   public func pack(builder: inout FlatBufferBuilder) -> Offset {
132     switch type {
133     case .m1:
134       var __obj = value as? MyGame_Example_MonsterT
135       return MyGame_Example_Monster.pack(&builder, obj: &__obj)
136     case .m2:
137       var __obj = value as? MyGame_Example_MonsterT
138       return MyGame_Example_Monster.pack(&builder, obj: &__obj)
139     case .m3:
140       var __obj = value as? MyGame_Example_MonsterT
141       return MyGame_Example_Monster.pack(&builder, obj: &__obj)
142     default: return Offset()
143     }
144   }
145 }
146 public struct MyGame_Example_Test: NativeStruct, NativeObject {
147 
validateVersionnull148   static func validateVersion() { FlatBuffersVersion_2_0_0() }
149 
150   private var _a: Int16
151   private var _b: Int8
152   private let padding0__: UInt8 = 0
153 
154   public init(a: Int16, b: Int8) {
155     _a = a
156     _b = b
157   }
158 
159   public init() {
160     _a = 0
161     _b = 0
162   }
163 
164   public init(_ _t: inout MyGame_Example_Test_Mutable) {
165     _a = _t.a
166     _b = _t.b
167   }
168 
169   public var a: Int16 { _a }
170   public var b: Int8 { _b }
171 }
172 
173 public struct MyGame_Example_Test_Mutable: FlatBufferObject {
174 
validateVersionnull175   static func validateVersion() { FlatBuffersVersion_2_0_0() }
176   public var __buffer: ByteBuffer! { return _accessor.bb }
177   private var _accessor: Struct
178 
179   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
180 
181   public var a: Int16 { return _accessor.readBuffer(of: Int16.self, at: 0) }
mutatenull182   @discardableResult public func mutate(a: Int16) -> Bool { return _accessor.mutate(a, index: 0) }
183   public var b: Int8 { return _accessor.readBuffer(of: Int8.self, at: 2) }
mutatenull184   @discardableResult public func mutate(b: Int8) -> Bool { return _accessor.mutate(b, index: 2) }
185 
186 
unpacknull187   public mutating func unpack() -> MyGame_Example_Test {
188     return MyGame_Example_Test(&self)
189   }
packnull190   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_Test?) -> Offset {
191     guard var obj = obj else { return Offset() }
192     return pack(&builder, obj: &obj)
193   }
194 
packnull195   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_Test) -> Offset {
196     return builder.create(struct: obj)
197   }
198 }
199 
200 public struct MyGame_Example_Vec3: NativeStruct, NativeObject {
201 
validateVersionnull202   static func validateVersion() { FlatBuffersVersion_2_0_0() }
203 
204   private var _x: Float32
205   private var _y: Float32
206   private var _z: Float32
207   private let padding0__: UInt32 = 0
208   private var _test1: Double
209   private var _test2: UInt8
210   private let padding1__: UInt8 = 0
211   private var _test3: MyGame_Example_Test
212   private let padding2__: UInt16 = 0
213 
214   public init(x: Float32, y: Float32, z: Float32, test1: Double, test2: MyGame_Example_Color, test3: MyGame_Example_Test) {
215     _x = x
216     _y = y
217     _z = z
218     _test1 = test1
219     _test2 = test2.value
220     _test3 = test3
221   }
222 
223   public init() {
224     _x = 0.0
225     _y = 0.0
226     _z = 0.0
227     _test1 = 0.0
228     _test2 = 0
229     _test3 = MyGame_Example_Test()
230   }
231 
232   public init(_ _t: inout MyGame_Example_Vec3_Mutable) {
233     _x = _t.x
234     _y = _t.y
235     _z = _t.z
236     _test1 = _t.test1
237     _test2 = _t.test2.value
238     var _vtest3 = _t.test3
239     _test3 = _vtest3.unpack()
240   }
241 
242   public var x: Float32 { _x }
243   public var y: Float32 { _y }
244   public var z: Float32 { _z }
245   public var test1: Double { _test1 }
246   public var test2: MyGame_Example_Color { MyGame_Example_Color(rawValue: _test2)! }
247   public var test3: MyGame_Example_Test { _test3 }
248 }
249 
250 public struct MyGame_Example_Vec3_Mutable: FlatBufferObject {
251 
validateVersionnull252   static func validateVersion() { FlatBuffersVersion_2_0_0() }
253   public var __buffer: ByteBuffer! { return _accessor.bb }
254   private var _accessor: Struct
255 
256   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
257 
258   public var x: Float32 { return _accessor.readBuffer(of: Float32.self, at: 0) }
mutatenull259   @discardableResult public func mutate(x: Float32) -> Bool { return _accessor.mutate(x, index: 0) }
260   public var y: Float32 { return _accessor.readBuffer(of: Float32.self, at: 4) }
mutatenull261   @discardableResult public func mutate(y: Float32) -> Bool { return _accessor.mutate(y, index: 4) }
262   public var z: Float32 { return _accessor.readBuffer(of: Float32.self, at: 8) }
mutatenull263   @discardableResult public func mutate(z: Float32) -> Bool { return _accessor.mutate(z, index: 8) }
264   public var test1: Double { return _accessor.readBuffer(of: Double.self, at: 16) }
mutatenull265   @discardableResult public func mutate(test1: Double) -> Bool { return _accessor.mutate(test1, index: 16) }
266   public var test2: MyGame_Example_Color { return MyGame_Example_Color(rawValue: _accessor.readBuffer(of: UInt8.self, at: 24)) ?? .red }
mutatenull267   @discardableResult public func mutate(test2: MyGame_Example_Color) -> Bool { return _accessor.mutate(test2.rawValue, index: 24) }
268   public var test3: MyGame_Example_Test_Mutable { return MyGame_Example_Test_Mutable(_accessor.bb, o: _accessor.postion + 26) }
269 
270 
unpacknull271   public mutating func unpack() -> MyGame_Example_Vec3 {
272     return MyGame_Example_Vec3(&self)
273   }
packnull274   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_Vec3?) -> Offset {
275     guard var obj = obj else { return Offset() }
276     return pack(&builder, obj: &obj)
277   }
278 
packnull279   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_Vec3) -> Offset {
280     return builder.create(struct: obj)
281   }
282 }
283 
284 public struct MyGame_Example_Ability: NativeStruct, NativeObject {
285 
validateVersionnull286   static func validateVersion() { FlatBuffersVersion_2_0_0() }
287 
288   private var _id: UInt32
289   private var _distance: UInt32
290 
291   public init(id: UInt32, distance: UInt32) {
292     _id = id
293     _distance = distance
294   }
295 
296   public init() {
297     _id = 0
298     _distance = 0
299   }
300 
301   public init(_ _t: inout MyGame_Example_Ability_Mutable) {
302     _id = _t.id
303     _distance = _t.distance
304   }
305 
306   public var id: UInt32 { _id }
307   public var distance: UInt32 { _distance }
308 }
309 
310 public struct MyGame_Example_Ability_Mutable: FlatBufferObject {
311 
validateVersionnull312   static func validateVersion() { FlatBuffersVersion_2_0_0() }
313   public var __buffer: ByteBuffer! { return _accessor.bb }
314   private var _accessor: Struct
315 
316   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
317 
318   public var id: UInt32 { return _accessor.readBuffer(of: UInt32.self, at: 0) }
mutatenull319   @discardableResult public func mutate(id: UInt32) -> Bool { return _accessor.mutate(id, index: 0) }
320   public var distance: UInt32 { return _accessor.readBuffer(of: UInt32.self, at: 4) }
mutatenull321   @discardableResult public func mutate(distance: UInt32) -> Bool { return _accessor.mutate(distance, index: 4) }
322 
323 
unpacknull324   public mutating func unpack() -> MyGame_Example_Ability {
325     return MyGame_Example_Ability(&self)
326   }
packnull327   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_Ability?) -> Offset {
328     guard var obj = obj else { return Offset() }
329     return pack(&builder, obj: &obj)
330   }
331 
packnull332   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_Ability) -> Offset {
333     return builder.create(struct: obj)
334   }
335 }
336 
337 public struct MyGame_Example_StructOfStructs: NativeStruct, NativeObject {
338 
validateVersionnull339   static func validateVersion() { FlatBuffersVersion_2_0_0() }
340 
341   private var _a: MyGame_Example_Ability
342   private var _b: MyGame_Example_Test
343   private var _c: MyGame_Example_Ability
344 
345   public init(a: MyGame_Example_Ability, b: MyGame_Example_Test, c: MyGame_Example_Ability) {
346     _a = a
347     _b = b
348     _c = c
349   }
350 
351   public init() {
352     _a = MyGame_Example_Ability()
353     _b = MyGame_Example_Test()
354     _c = MyGame_Example_Ability()
355   }
356 
357   public init(_ _t: inout MyGame_Example_StructOfStructs_Mutable) {
358     var _va = _t.a
359     _a = _va.unpack()
360     var _vb = _t.b
361     _b = _vb.unpack()
362     var _vc = _t.c
363     _c = _vc.unpack()
364   }
365 
366   public var a: MyGame_Example_Ability { _a }
367   public var b: MyGame_Example_Test { _b }
368   public var c: MyGame_Example_Ability { _c }
369 }
370 
371 public struct MyGame_Example_StructOfStructs_Mutable: FlatBufferObject {
372 
validateVersionnull373   static func validateVersion() { FlatBuffersVersion_2_0_0() }
374   public var __buffer: ByteBuffer! { return _accessor.bb }
375   private var _accessor: Struct
376 
377   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
378 
379   public var a: MyGame_Example_Ability_Mutable { return MyGame_Example_Ability_Mutable(_accessor.bb, o: _accessor.postion + 0) }
380   public var b: MyGame_Example_Test_Mutable { return MyGame_Example_Test_Mutable(_accessor.bb, o: _accessor.postion + 8) }
381   public var c: MyGame_Example_Ability_Mutable { return MyGame_Example_Ability_Mutable(_accessor.bb, o: _accessor.postion + 12) }
382 
383 
unpacknull384   public mutating func unpack() -> MyGame_Example_StructOfStructs {
385     return MyGame_Example_StructOfStructs(&self)
386   }
packnull387   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_StructOfStructs?) -> Offset {
388     guard var obj = obj else { return Offset() }
389     return pack(&builder, obj: &obj)
390   }
391 
packnull392   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_StructOfStructs) -> Offset {
393     return builder.create(struct: obj)
394   }
395 }
396 
397 public struct MyGame_InParentNamespace: FlatBufferObject, ObjectAPIPacker {
398 
validateVersionnull399   static func validateVersion() { FlatBuffersVersion_2_0_0() }
400   public var __buffer: ByteBuffer! { return _accessor.bb }
401   private var _accessor: Table
402 
finishnull403   public static func finish(_ fbb: inout FlatBufferBuilder, end: Offset, prefix: Bool = false) { fbb.finish(offset: end, fileId: "MONS", addPrefix: prefix) }
getRootAsInParentNamespacenull404   public static func getRootAsInParentNamespace(bb: ByteBuffer) -> MyGame_InParentNamespace { return MyGame_InParentNamespace(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
405 
406   private init(_ t: Table) { _accessor = t }
407   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
408 
startInParentNamespacenull409   public static func startInParentNamespace(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 0) }
endInParentNamespacenull410   public static func endInParentNamespace(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
411 
412 
unpacknull413   public mutating func unpack() -> MyGame_InParentNamespaceT {
414     return MyGame_InParentNamespaceT(&self)
415   }
packnull416   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_InParentNamespaceT?) -> Offset {
417     guard var obj = obj else { return Offset() }
418     return pack(&builder, obj: &obj)
419   }
420 
packnull421   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_InParentNamespaceT) -> Offset {
422     let __root = MyGame_InParentNamespace.startInParentNamespace(&builder)
423     return MyGame_InParentNamespace.endInParentNamespace(&builder, start: __root)
424   }
425 }
426 
427 public class MyGame_InParentNamespaceT: NativeObject {
428 
429 
430   public init(_ _t: inout MyGame_InParentNamespace) {
431   }
432 
433   public init() {
434   }
435 
serializenull436   public func serialize() -> ByteBuffer { return serialize(type: MyGame_InParentNamespace.self) }
437 
438 }
439 public struct MyGame_Example2_Monster: FlatBufferObject, ObjectAPIPacker {
440 
validateVersionnull441   static func validateVersion() { FlatBuffersVersion_2_0_0() }
442   public var __buffer: ByteBuffer! { return _accessor.bb }
443   private var _accessor: Table
444 
finishnull445   public static func finish(_ fbb: inout FlatBufferBuilder, end: Offset, prefix: Bool = false) { fbb.finish(offset: end, fileId: "MONS", addPrefix: prefix) }
getRootAsMonsternull446   public static func getRootAsMonster(bb: ByteBuffer) -> MyGame_Example2_Monster { return MyGame_Example2_Monster(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
447 
448   private init(_ t: Table) { _accessor = t }
449   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
450 
startMonsternull451   public static func startMonster(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 0) }
endMonsternull452   public static func endMonster(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
453 
454 
unpacknull455   public mutating func unpack() -> MyGame_Example2_MonsterT {
456     return MyGame_Example2_MonsterT(&self)
457   }
packnull458   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example2_MonsterT?) -> Offset {
459     guard var obj = obj else { return Offset() }
460     return pack(&builder, obj: &obj)
461   }
462 
packnull463   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example2_MonsterT) -> Offset {
464     let __root = MyGame_Example2_Monster.startMonster(&builder)
465     return MyGame_Example2_Monster.endMonster(&builder, start: __root)
466   }
467 }
468 
469 public class MyGame_Example2_MonsterT: NativeObject {
470 
471 
472   public init(_ _t: inout MyGame_Example2_Monster) {
473   }
474 
475   public init() {
476   }
477 
serializenull478   public func serialize() -> ByteBuffer { return serialize(type: MyGame_Example2_Monster.self) }
479 
480 }
481 internal struct MyGame_Example_TestSimpleTableWithEnum: FlatBufferObject, ObjectAPIPacker {
482 
validateVersionnull483   static func validateVersion() { FlatBuffersVersion_2_0_0() }
484   internal var __buffer: ByteBuffer! { return _accessor.bb }
485   private var _accessor: Table
486 
finishnull487   internal static func finish(_ fbb: inout FlatBufferBuilder, end: Offset, prefix: Bool = false) { fbb.finish(offset: end, fileId: "MONS", addPrefix: prefix) }
getRootAsTestSimpleTableWithEnumnull488   internal static func getRootAsTestSimpleTableWithEnum(bb: ByteBuffer) -> MyGame_Example_TestSimpleTableWithEnum { return MyGame_Example_TestSimpleTableWithEnum(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
489 
490   private init(_ t: Table) { _accessor = t }
491   internal init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
492 
493   private enum VTOFFSET: VOffset {
494     case color = 4
495     var v: Int32 { Int32(self.rawValue) }
496     var p: VOffset { self.rawValue }
497   }
498 
499   internal var color: MyGame_Example_Color { let o = _accessor.offset(VTOFFSET.color.v); return o == 0 ? .green : MyGame_Example_Color(rawValue: _accessor.readBuffer(of: UInt8.self, at: o)) ?? .green }
mutatenull500   @discardableResult internal func mutate(color: MyGame_Example_Color) -> Bool {let o = _accessor.offset(VTOFFSET.color.v);  return _accessor.mutate(color.rawValue, index: o) }
startTestSimpleTableWithEnumnull501   internal static func startTestSimpleTableWithEnum(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 1) }
addnull502   internal static func add(color: MyGame_Example_Color, _ fbb: inout FlatBufferBuilder) { fbb.add(element: color.rawValue, def: 2, at: VTOFFSET.color.p) }
endTestSimpleTableWithEnumnull503   internal static func endTestSimpleTableWithEnum(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
504   internal static func createTestSimpleTableWithEnum(
505     _ fbb: inout FlatBufferBuilder,
506     color: MyGame_Example_Color = .green
507   ) -> Offset {
508     let __start = MyGame_Example_TestSimpleTableWithEnum.startTestSimpleTableWithEnum(&fbb)
509     MyGame_Example_TestSimpleTableWithEnum.add(color: color, &fbb)
510     return MyGame_Example_TestSimpleTableWithEnum.endTestSimpleTableWithEnum(&fbb, start: __start)
511   }
512 
513 
unpacknull514   internal mutating func unpack() -> MyGame_Example_TestSimpleTableWithEnumT {
515     return MyGame_Example_TestSimpleTableWithEnumT(&self)
516   }
packnull517   internal static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_TestSimpleTableWithEnumT?) -> Offset {
518     guard var obj = obj else { return Offset() }
519     return pack(&builder, obj: &obj)
520   }
521 
packnull522   internal static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_TestSimpleTableWithEnumT) -> Offset {
523     let __root = MyGame_Example_TestSimpleTableWithEnum.startTestSimpleTableWithEnum(&builder)
524     MyGame_Example_TestSimpleTableWithEnum.add(color: obj.color, &builder)
525     return MyGame_Example_TestSimpleTableWithEnum.endTestSimpleTableWithEnum(&builder, start: __root)
526   }
527 }
528 
529 internal class MyGame_Example_TestSimpleTableWithEnumT: NativeObject {
530 
531   internal var color: MyGame_Example_Color
532 
533   internal init(_ _t: inout MyGame_Example_TestSimpleTableWithEnum) {
534     color = _t.color
535   }
536 
537   internal init() {
538     color = .green
539   }
540 
serializenull541   internal func serialize() -> ByteBuffer { return serialize(type: MyGame_Example_TestSimpleTableWithEnum.self) }
542 
543 }
544 public struct MyGame_Example_Stat: FlatBufferObject, ObjectAPIPacker {
545 
validateVersionnull546   static func validateVersion() { FlatBuffersVersion_2_0_0() }
547   public var __buffer: ByteBuffer! { return _accessor.bb }
548   private var _accessor: Table
549 
finishnull550   public static func finish(_ fbb: inout FlatBufferBuilder, end: Offset, prefix: Bool = false) { fbb.finish(offset: end, fileId: "MONS", addPrefix: prefix) }
getRootAsStatnull551   public static func getRootAsStat(bb: ByteBuffer) -> MyGame_Example_Stat { return MyGame_Example_Stat(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
552 
553   private init(_ t: Table) { _accessor = t }
554   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
555 
556   private enum VTOFFSET: VOffset {
557     case id = 4
558     case val = 6
559     case count = 8
560     var v: Int32 { Int32(self.rawValue) }
561     var p: VOffset { self.rawValue }
562   }
563 
564   public var id: String? { let o = _accessor.offset(VTOFFSET.id.v); return o == 0 ? nil : _accessor.string(at: o) }
565   public var idSegmentArray: [UInt8]? { return _accessor.getVector(at: VTOFFSET.id.v) }
566   public var val: Int64 { let o = _accessor.offset(VTOFFSET.val.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int64.self, at: o) }
mutatenull567   @discardableResult public func mutate(val: Int64) -> Bool {let o = _accessor.offset(VTOFFSET.val.v);  return _accessor.mutate(val, index: o) }
568   public var count: UInt16 { let o = _accessor.offset(VTOFFSET.count.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt16.self, at: o) }
mutatenull569   @discardableResult public func mutate(count: UInt16) -> Bool {let o = _accessor.offset(VTOFFSET.count.v);  return _accessor.mutate(count, index: o) }
startStatnull570   public static func startStat(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 3) }
addnull571   public static func add(id: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: id, at: VTOFFSET.id.p) }
addnull572   public static func add(val: Int64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: val, def: 0, at: VTOFFSET.val.p) }
addnull573   public static func add(count: UInt16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: count, def: 0, at: VTOFFSET.count.p) }
endStatnull574   public static func endStat(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
575   public static func createStat(
576     _ fbb: inout FlatBufferBuilder,
577     idOffset id: Offset = Offset(),
578     val: Int64 = 0,
579     count: UInt16 = 0
580   ) -> Offset {
581     let __start = MyGame_Example_Stat.startStat(&fbb)
582     MyGame_Example_Stat.add(id: id, &fbb)
583     MyGame_Example_Stat.add(val: val, &fbb)
584     MyGame_Example_Stat.add(count: count, &fbb)
585     return MyGame_Example_Stat.endStat(&fbb, start: __start)
586   }
sortVectorOfStatnull587   public static func sortVectorOfStat(offsets:[Offset], _ fbb: inout FlatBufferBuilder) -> Offset {
588     var off = offsets
589     off.sort { Table.compare(Table.offset(Int32($1.o), vOffset: 8, fbb: fbb.buffer), Table.offset(Int32($0.o), vOffset: 8, fbb: fbb.buffer), fbb: fbb.buffer) < 0 }
590     return fbb.createVector(ofOffsets: off)
591   }
lookupByKeynull592   fileprivate static func lookupByKey(vector: Int32, key: UInt16, fbb: ByteBuffer) -> MyGame_Example_Stat? {
593     var span = fbb.read(def: Int32.self, position: Int(vector - 4))
594     var start: Int32 = 0
595     while span != 0 {
596       var middle = span / 2
597       let tableOffset = Table.indirect(vector + 4 * (start + middle), fbb)
598       let comp = fbb.read(def: UInt16.self, position: Int(Table.offset(Int32(fbb.capacity) - tableOffset, vOffset: 8, fbb: fbb)))
599       if comp > 0 {
600         span = middle
601       } else if comp < 0 {
602         middle += 1
603         start += middle
604         span -= middle
605       } else {
606         return MyGame_Example_Stat(fbb, o: tableOffset)
607       }
608     }
609     return nil
610   }
611 
612 
unpacknull613   public mutating func unpack() -> MyGame_Example_StatT {
614     return MyGame_Example_StatT(&self)
615   }
packnull616   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_StatT?) -> Offset {
617     guard var obj = obj else { return Offset() }
618     return pack(&builder, obj: &obj)
619   }
620 
packnull621   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_StatT) -> Offset {
622     let __id: Offset
623     if let s = obj.id {
624       __id = builder.create(string: s)
625     } else {
626       __id = Offset()
627     }
628 
629     let __root = MyGame_Example_Stat.startStat(&builder)
630     MyGame_Example_Stat.add(id: __id, &builder)
631     MyGame_Example_Stat.add(val: obj.val, &builder)
632     MyGame_Example_Stat.add(count: obj.count, &builder)
633     return MyGame_Example_Stat.endStat(&builder, start: __root)
634   }
635 }
636 
637 public class MyGame_Example_StatT: NativeObject {
638 
639   public var id: String?
640   public var val: Int64
641   public var count: UInt16
642 
643   public init(_ _t: inout MyGame_Example_Stat) {
644     id = _t.id
645     val = _t.val
646     count = _t.count
647   }
648 
649   public init() {
650     val = 0
651     count = 0
652   }
653 
serializenull654   public func serialize() -> ByteBuffer { return serialize(type: MyGame_Example_Stat.self) }
655 
656 }
657 public struct MyGame_Example_Referrable: FlatBufferObject, ObjectAPIPacker {
658 
validateVersionnull659   static func validateVersion() { FlatBuffersVersion_2_0_0() }
660   public var __buffer: ByteBuffer! { return _accessor.bb }
661   private var _accessor: Table
662 
finishnull663   public static func finish(_ fbb: inout FlatBufferBuilder, end: Offset, prefix: Bool = false) { fbb.finish(offset: end, fileId: "MONS", addPrefix: prefix) }
getRootAsReferrablenull664   public static func getRootAsReferrable(bb: ByteBuffer) -> MyGame_Example_Referrable { return MyGame_Example_Referrable(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
665 
666   private init(_ t: Table) { _accessor = t }
667   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
668 
669   private enum VTOFFSET: VOffset {
670     case id = 4
671     var v: Int32 { Int32(self.rawValue) }
672     var p: VOffset { self.rawValue }
673   }
674 
675   public var id: UInt64 { let o = _accessor.offset(VTOFFSET.id.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt64.self, at: o) }
mutatenull676   @discardableResult public func mutate(id: UInt64) -> Bool {let o = _accessor.offset(VTOFFSET.id.v);  return _accessor.mutate(id, index: o) }
startReferrablenull677   public static func startReferrable(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 1) }
addnull678   public static func add(id: UInt64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: id, def: 0, at: VTOFFSET.id.p) }
endReferrablenull679   public static func endReferrable(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
680   public static func createReferrable(
681     _ fbb: inout FlatBufferBuilder,
682     id: UInt64 = 0
683   ) -> Offset {
684     let __start = MyGame_Example_Referrable.startReferrable(&fbb)
685     MyGame_Example_Referrable.add(id: id, &fbb)
686     return MyGame_Example_Referrable.endReferrable(&fbb, start: __start)
687   }
sortVectorOfReferrablenull688   public static func sortVectorOfReferrable(offsets:[Offset], _ fbb: inout FlatBufferBuilder) -> Offset {
689     var off = offsets
690     off.sort { Table.compare(Table.offset(Int32($1.o), vOffset: 4, fbb: fbb.buffer), Table.offset(Int32($0.o), vOffset: 4, fbb: fbb.buffer), fbb: fbb.buffer) < 0 }
691     return fbb.createVector(ofOffsets: off)
692   }
lookupByKeynull693   fileprivate static func lookupByKey(vector: Int32, key: UInt64, fbb: ByteBuffer) -> MyGame_Example_Referrable? {
694     var span = fbb.read(def: Int32.self, position: Int(vector - 4))
695     var start: Int32 = 0
696     while span != 0 {
697       var middle = span / 2
698       let tableOffset = Table.indirect(vector + 4 * (start + middle), fbb)
699       let comp = fbb.read(def: UInt64.self, position: Int(Table.offset(Int32(fbb.capacity) - tableOffset, vOffset: 4, fbb: fbb)))
700       if comp > 0 {
701         span = middle
702       } else if comp < 0 {
703         middle += 1
704         start += middle
705         span -= middle
706       } else {
707         return MyGame_Example_Referrable(fbb, o: tableOffset)
708       }
709     }
710     return nil
711   }
712 
713 
unpacknull714   public mutating func unpack() -> MyGame_Example_ReferrableT {
715     return MyGame_Example_ReferrableT(&self)
716   }
packnull717   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_ReferrableT?) -> Offset {
718     guard var obj = obj else { return Offset() }
719     return pack(&builder, obj: &obj)
720   }
721 
packnull722   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_ReferrableT) -> Offset {
723     let __root = MyGame_Example_Referrable.startReferrable(&builder)
724     MyGame_Example_Referrable.add(id: obj.id, &builder)
725     return MyGame_Example_Referrable.endReferrable(&builder, start: __root)
726   }
727 }
728 
729 public class MyGame_Example_ReferrableT: NativeObject {
730 
731   public var id: UInt64
732 
733   public init(_ _t: inout MyGame_Example_Referrable) {
734     id = _t.id
735   }
736 
737   public init() {
738     id = 0
739   }
740 
serializenull741   public func serialize() -> ByteBuffer { return serialize(type: MyGame_Example_Referrable.self) }
742 
743 }
744 ///  an example documentation comment: "monster object"
745 public struct MyGame_Example_Monster: FlatBufferObject, ObjectAPIPacker {
746 
validateVersionnull747   static func validateVersion() { FlatBuffersVersion_2_0_0() }
748   public var __buffer: ByteBuffer! { return _accessor.bb }
749   private var _accessor: Table
750 
finishnull751   public static func finish(_ fbb: inout FlatBufferBuilder, end: Offset, prefix: Bool = false) { fbb.finish(offset: end, fileId: "MONS", addPrefix: prefix) }
getRootAsMonsternull752   public static func getRootAsMonster(bb: ByteBuffer) -> MyGame_Example_Monster { return MyGame_Example_Monster(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
753 
754   private init(_ t: Table) { _accessor = t }
755   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
756 
757   private enum VTOFFSET: VOffset {
758     case pos = 4
759     case mana = 6
760     case hp = 8
761     case name = 10
762     case inventory = 14
763     case color = 16
764     case testType = 18
765     case test = 20
766     case test4 = 22
767     case testarrayofstring = 24
768     case testarrayoftables = 26
769     case enemy = 28
770     case testnestedflatbuffer = 30
771     case testempty = 32
772     case testbool = 34
773     case testhashs32Fnv1 = 36
774     case testhashu32Fnv1 = 38
775     case testhashs64Fnv1 = 40
776     case testhashu64Fnv1 = 42
777     case testhashs32Fnv1a = 44
778     case testhashu32Fnv1a = 46
779     case testhashs64Fnv1a = 48
780     case testhashu64Fnv1a = 50
781     case testarrayofbools = 52
782     case testf = 54
783     case testf2 = 56
784     case testf3 = 58
785     case testarrayofstring2 = 60
786     case testarrayofsortedstruct = 62
787     case flex = 64
788     case test5 = 66
789     case vectorOfLongs = 68
790     case vectorOfDoubles = 70
791     case parentNamespaceTest = 72
792     case vectorOfReferrables = 74
793     case singleWeakReference = 76
794     case vectorOfWeakReferences = 78
795     case vectorOfStrongReferrables = 80
796     case coOwningReference = 82
797     case vectorOfCoOwningReferences = 84
798     case nonOwningReference = 86
799     case vectorOfNonOwningReferences = 88
800     case anyUniqueType = 90
801     case anyUnique = 92
802     case anyAmbiguousType = 94
803     case anyAmbiguous = 96
804     case vectorOfEnums = 98
805     case signedEnum = 100
806     case testrequirednestedflatbuffer = 102
807     case scalarKeySortedTables = 104
808     var v: Int32 { Int32(self.rawValue) }
809     var p: VOffset { self.rawValue }
810   }
811 
812   public var pos: MyGame_Example_Vec3? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : _accessor.readBuffer(of: MyGame_Example_Vec3.self, at: o) }
813   public var mutablePos: MyGame_Example_Vec3_Mutable? { let o = _accessor.offset(VTOFFSET.pos.v); return o == 0 ? nil : MyGame_Example_Vec3_Mutable(_accessor.bb, o: o + _accessor.postion) }
814   public var mana: Int16 { let o = _accessor.offset(VTOFFSET.mana.v); return o == 0 ? 150 : _accessor.readBuffer(of: Int16.self, at: o) }
mutatenull815   @discardableResult public func mutate(mana: Int16) -> Bool {let o = _accessor.offset(VTOFFSET.mana.v);  return _accessor.mutate(mana, index: o) }
816   public var hp: Int16 { let o = _accessor.offset(VTOFFSET.hp.v); return o == 0 ? 100 : _accessor.readBuffer(of: Int16.self, at: o) }
mutatenull817   @discardableResult public func mutate(hp: Int16) -> Bool {let o = _accessor.offset(VTOFFSET.hp.v);  return _accessor.mutate(hp, index: o) }
818   public var name: String! { let o = _accessor.offset(VTOFFSET.name.v); return _accessor.string(at: o) }
819   public var nameSegmentArray: [UInt8]! { return _accessor.getVector(at: VTOFFSET.name.v) }
820   public var inventoryCount: Int32 { let o = _accessor.offset(VTOFFSET.inventory.v); return o == 0 ? 0 : _accessor.vector(count: o) }
inventorynull821   public func inventory(at index: Int32) -> UInt8 { let o = _accessor.offset(VTOFFSET.inventory.v); return o == 0 ? 0 : _accessor.directRead(of: UInt8.self, offset: _accessor.vector(at: o) + index * 1) }
822   public var inventory: [UInt8] { return _accessor.getVector(at: VTOFFSET.inventory.v) ?? [] }
mutatenull823   public func mutate(inventory: UInt8, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.inventory.v); return _accessor.directMutate(inventory, index: _accessor.vector(at: o) + index * 1) }
824   public var color: MyGame_Example_Color { let o = _accessor.offset(VTOFFSET.color.v); return o == 0 ? .blue : MyGame_Example_Color(rawValue: _accessor.readBuffer(of: UInt8.self, at: o)) ?? .blue }
mutatenull825   @discardableResult public func mutate(color: MyGame_Example_Color) -> Bool {let o = _accessor.offset(VTOFFSET.color.v);  return _accessor.mutate(color.rawValue, index: o) }
826   public var testType: MyGame_Example_Any_ { let o = _accessor.offset(VTOFFSET.testType.v); return o == 0 ? .none_ : MyGame_Example_Any_(rawValue: _accessor.readBuffer(of: UInt8.self, at: o)) ?? .none_ }
test<T: FlatbuffersInitializable>null827   public func test<T: FlatbuffersInitializable>(type: T.Type) -> T? { let o = _accessor.offset(VTOFFSET.test.v); return o == 0 ? nil : _accessor.union(o) }
828   public var test4Count: Int32 { let o = _accessor.offset(VTOFFSET.test4.v); return o == 0 ? 0 : _accessor.vector(count: o) }
test4null829   public func test4(at index: Int32) -> MyGame_Example_Test? { let o = _accessor.offset(VTOFFSET.test4.v); return o == 0 ? nil : _accessor.directRead(of: MyGame_Example_Test.self, offset: _accessor.vector(at: o) + index * 4) }
mutableTest4null830   public func mutableTest4(at index: Int32) -> MyGame_Example_Test_Mutable? { let o = _accessor.offset(VTOFFSET.test4.v); return o == 0 ? nil : MyGame_Example_Test_Mutable(_accessor.bb, o: _accessor.vector(at: o) + index * 4) }
831   public var testarrayofstringCount: Int32 { let o = _accessor.offset(VTOFFSET.testarrayofstring.v); return o == 0 ? 0 : _accessor.vector(count: o) }
testarrayofstringnull832   public func testarrayofstring(at index: Int32) -> String? { let o = _accessor.offset(VTOFFSET.testarrayofstring.v); return o == 0 ? nil : _accessor.directString(at: _accessor.vector(at: o) + index * 4) }
833   ///  an example documentation comment: this will end up in the generated code
834   ///  multiline too
835   public var testarrayoftablesCount: Int32 { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? 0 : _accessor.vector(count: o) }
testarrayoftablesnull836   public func testarrayoftables(at index: Int32) -> MyGame_Example_Monster? { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? nil : MyGame_Example_Monster(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
testarrayoftablesBynull837   public func testarrayoftablesBy(key: String) -> MyGame_Example_Monster? { let o = _accessor.offset(VTOFFSET.testarrayoftables.v); return o == 0 ? nil : MyGame_Example_Monster.lookupByKey(vector: _accessor.vector(at: o), key: key, fbb: _accessor.bb) }
838   public var enemy: MyGame_Example_Monster? { let o = _accessor.offset(VTOFFSET.enemy.v); return o == 0 ? nil : MyGame_Example_Monster(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
839   public var testnestedflatbufferCount: Int32 { let o = _accessor.offset(VTOFFSET.testnestedflatbuffer.v); return o == 0 ? 0 : _accessor.vector(count: o) }
testnestedflatbuffernull840   public func testnestedflatbuffer(at index: Int32) -> UInt8 { let o = _accessor.offset(VTOFFSET.testnestedflatbuffer.v); return o == 0 ? 0 : _accessor.directRead(of: UInt8.self, offset: _accessor.vector(at: o) + index * 1) }
841   public var testnestedflatbuffer: [UInt8] { return _accessor.getVector(at: VTOFFSET.testnestedflatbuffer.v) ?? [] }
mutatenull842   public func mutate(testnestedflatbuffer: UInt8, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.testnestedflatbuffer.v); return _accessor.directMutate(testnestedflatbuffer, index: _accessor.vector(at: o) + index * 1) }
843   public var testempty: MyGame_Example_Stat? { let o = _accessor.offset(VTOFFSET.testempty.v); return o == 0 ? nil : MyGame_Example_Stat(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
844   public var testbool: Bool { let o = _accessor.offset(VTOFFSET.testbool.v); return o == 0 ? false : 0 != _accessor.readBuffer(of: Byte.self, at: o) }
mutatenull845   @discardableResult public func mutate(testbool: Byte) -> Bool {let o = _accessor.offset(VTOFFSET.testbool.v);  return _accessor.mutate(testbool, index: o) }
846   public var testhashs32Fnv1: Int32 { let o = _accessor.offset(VTOFFSET.testhashs32Fnv1.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int32.self, at: o) }
mutatenull847   @discardableResult public func mutate(testhashs32Fnv1: Int32) -> Bool {let o = _accessor.offset(VTOFFSET.testhashs32Fnv1.v);  return _accessor.mutate(testhashs32Fnv1, index: o) }
848   public var testhashu32Fnv1: UInt32 { let o = _accessor.offset(VTOFFSET.testhashu32Fnv1.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt32.self, at: o) }
mutatenull849   @discardableResult public func mutate(testhashu32Fnv1: UInt32) -> Bool {let o = _accessor.offset(VTOFFSET.testhashu32Fnv1.v);  return _accessor.mutate(testhashu32Fnv1, index: o) }
850   public var testhashs64Fnv1: Int64 { let o = _accessor.offset(VTOFFSET.testhashs64Fnv1.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int64.self, at: o) }
mutatenull851   @discardableResult public func mutate(testhashs64Fnv1: Int64) -> Bool {let o = _accessor.offset(VTOFFSET.testhashs64Fnv1.v);  return _accessor.mutate(testhashs64Fnv1, index: o) }
852   public var testhashu64Fnv1: UInt64 { let o = _accessor.offset(VTOFFSET.testhashu64Fnv1.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt64.self, at: o) }
mutatenull853   @discardableResult public func mutate(testhashu64Fnv1: UInt64) -> Bool {let o = _accessor.offset(VTOFFSET.testhashu64Fnv1.v);  return _accessor.mutate(testhashu64Fnv1, index: o) }
854   public var testhashs32Fnv1a: Int32 { let o = _accessor.offset(VTOFFSET.testhashs32Fnv1a.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int32.self, at: o) }
mutatenull855   @discardableResult public func mutate(testhashs32Fnv1a: Int32) -> Bool {let o = _accessor.offset(VTOFFSET.testhashs32Fnv1a.v);  return _accessor.mutate(testhashs32Fnv1a, index: o) }
856   public var testhashu32Fnv1a: UInt32 { let o = _accessor.offset(VTOFFSET.testhashu32Fnv1a.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt32.self, at: o) }
mutatenull857   @discardableResult public func mutate(testhashu32Fnv1a: UInt32) -> Bool {let o = _accessor.offset(VTOFFSET.testhashu32Fnv1a.v);  return _accessor.mutate(testhashu32Fnv1a, index: o) }
858   public var testhashs64Fnv1a: Int64 { let o = _accessor.offset(VTOFFSET.testhashs64Fnv1a.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int64.self, at: o) }
mutatenull859   @discardableResult public func mutate(testhashs64Fnv1a: Int64) -> Bool {let o = _accessor.offset(VTOFFSET.testhashs64Fnv1a.v);  return _accessor.mutate(testhashs64Fnv1a, index: o) }
860   public var testhashu64Fnv1a: UInt64 { let o = _accessor.offset(VTOFFSET.testhashu64Fnv1a.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt64.self, at: o) }
mutatenull861   @discardableResult public func mutate(testhashu64Fnv1a: UInt64) -> Bool {let o = _accessor.offset(VTOFFSET.testhashu64Fnv1a.v);  return _accessor.mutate(testhashu64Fnv1a, index: o) }
862   public var testarrayofboolsCount: Int32 { let o = _accessor.offset(VTOFFSET.testarrayofbools.v); return o == 0 ? 0 : _accessor.vector(count: o) }
testarrayofboolsnull863   public func testarrayofbools(at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.testarrayofbools.v); return o == 0 ? true : _accessor.directRead(of: Bool.self, offset: _accessor.vector(at: o) + index * 1) }
864   public var testarrayofbools: [Bool] { return _accessor.getVector(at: VTOFFSET.testarrayofbools.v) ?? [] }
mutatenull865   public func mutate(testarrayofbools: Bool, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.testarrayofbools.v); return _accessor.directMutate(testarrayofbools, index: _accessor.vector(at: o) + index * 1) }
866   public var testf: Float32 { let o = _accessor.offset(VTOFFSET.testf.v); return o == 0 ? 3.14159 : _accessor.readBuffer(of: Float32.self, at: o) }
mutatenull867   @discardableResult public func mutate(testf: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.testf.v);  return _accessor.mutate(testf, index: o) }
868   public var testf2: Float32 { let o = _accessor.offset(VTOFFSET.testf2.v); return o == 0 ? 3.0 : _accessor.readBuffer(of: Float32.self, at: o) }
mutatenull869   @discardableResult public func mutate(testf2: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.testf2.v);  return _accessor.mutate(testf2, index: o) }
870   public var testf3: Float32 { let o = _accessor.offset(VTOFFSET.testf3.v); return o == 0 ? 0.0 : _accessor.readBuffer(of: Float32.self, at: o) }
mutatenull871   @discardableResult public func mutate(testf3: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.testf3.v);  return _accessor.mutate(testf3, index: o) }
872   public var testarrayofstring2Count: Int32 { let o = _accessor.offset(VTOFFSET.testarrayofstring2.v); return o == 0 ? 0 : _accessor.vector(count: o) }
testarrayofstring2null873   public func testarrayofstring2(at index: Int32) -> String? { let o = _accessor.offset(VTOFFSET.testarrayofstring2.v); return o == 0 ? nil : _accessor.directString(at: _accessor.vector(at: o) + index * 4) }
874   public var testarrayofsortedstructCount: Int32 { let o = _accessor.offset(VTOFFSET.testarrayofsortedstruct.v); return o == 0 ? 0 : _accessor.vector(count: o) }
testarrayofsortedstructnull875   public func testarrayofsortedstruct(at index: Int32) -> MyGame_Example_Ability? { let o = _accessor.offset(VTOFFSET.testarrayofsortedstruct.v); return o == 0 ? nil : _accessor.directRead(of: MyGame_Example_Ability.self, offset: _accessor.vector(at: o) + index * 8) }
mutableTestarrayofsortedstructnull876   public func mutableTestarrayofsortedstruct(at index: Int32) -> MyGame_Example_Ability_Mutable? { let o = _accessor.offset(VTOFFSET.testarrayofsortedstruct.v); return o == 0 ? nil : MyGame_Example_Ability_Mutable(_accessor.bb, o: _accessor.vector(at: o) + index * 8) }
877   public var flexCount: Int32 { let o = _accessor.offset(VTOFFSET.flex.v); return o == 0 ? 0 : _accessor.vector(count: o) }
flexnull878   public func flex(at index: Int32) -> UInt8 { let o = _accessor.offset(VTOFFSET.flex.v); return o == 0 ? 0 : _accessor.directRead(of: UInt8.self, offset: _accessor.vector(at: o) + index * 1) }
879   public var flex: [UInt8] { return _accessor.getVector(at: VTOFFSET.flex.v) ?? [] }
mutatenull880   public func mutate(flex: UInt8, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.flex.v); return _accessor.directMutate(flex, index: _accessor.vector(at: o) + index * 1) }
881   public var test5Count: Int32 { let o = _accessor.offset(VTOFFSET.test5.v); return o == 0 ? 0 : _accessor.vector(count: o) }
test5null882   public func test5(at index: Int32) -> MyGame_Example_Test? { let o = _accessor.offset(VTOFFSET.test5.v); return o == 0 ? nil : _accessor.directRead(of: MyGame_Example_Test.self, offset: _accessor.vector(at: o) + index * 4) }
mutableTest5null883   public func mutableTest5(at index: Int32) -> MyGame_Example_Test_Mutable? { let o = _accessor.offset(VTOFFSET.test5.v); return o == 0 ? nil : MyGame_Example_Test_Mutable(_accessor.bb, o: _accessor.vector(at: o) + index * 4) }
884   public var vectorOfLongsCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfLongs.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vectorOfLongsnull885   public func vectorOfLongs(at index: Int32) -> Int64 { let o = _accessor.offset(VTOFFSET.vectorOfLongs.v); return o == 0 ? 0 : _accessor.directRead(of: Int64.self, offset: _accessor.vector(at: o) + index * 8) }
886   public var vectorOfLongs: [Int64] { return _accessor.getVector(at: VTOFFSET.vectorOfLongs.v) ?? [] }
mutatenull887   public func mutate(vectorOfLongs: Int64, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.vectorOfLongs.v); return _accessor.directMutate(vectorOfLongs, index: _accessor.vector(at: o) + index * 8) }
888   public var vectorOfDoublesCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfDoubles.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vectorOfDoublesnull889   public func vectorOfDoubles(at index: Int32) -> Double { let o = _accessor.offset(VTOFFSET.vectorOfDoubles.v); return o == 0 ? 0 : _accessor.directRead(of: Double.self, offset: _accessor.vector(at: o) + index * 8) }
890   public var vectorOfDoubles: [Double] { return _accessor.getVector(at: VTOFFSET.vectorOfDoubles.v) ?? [] }
mutatenull891   public func mutate(vectorOfDoubles: Double, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.vectorOfDoubles.v); return _accessor.directMutate(vectorOfDoubles, index: _accessor.vector(at: o) + index * 8) }
892   public var parentNamespaceTest: MyGame_InParentNamespace? { let o = _accessor.offset(VTOFFSET.parentNamespaceTest.v); return o == 0 ? nil : MyGame_InParentNamespace(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
893   public var vectorOfReferrablesCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfReferrables.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vectorOfReferrablesnull894   public func vectorOfReferrables(at index: Int32) -> MyGame_Example_Referrable? { let o = _accessor.offset(VTOFFSET.vectorOfReferrables.v); return o == 0 ? nil : MyGame_Example_Referrable(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
vectorOfReferrablesBynull895   public func vectorOfReferrablesBy(key: UInt64) -> MyGame_Example_Referrable? { let o = _accessor.offset(VTOFFSET.vectorOfReferrables.v); return o == 0 ? nil : MyGame_Example_Referrable.lookupByKey(vector: _accessor.vector(at: o), key: key, fbb: _accessor.bb) }
896   public var singleWeakReference: UInt64 { let o = _accessor.offset(VTOFFSET.singleWeakReference.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt64.self, at: o) }
mutatenull897   @discardableResult public func mutate(singleWeakReference: UInt64) -> Bool {let o = _accessor.offset(VTOFFSET.singleWeakReference.v);  return _accessor.mutate(singleWeakReference, index: o) }
898   public var vectorOfWeakReferencesCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfWeakReferences.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vectorOfWeakReferencesnull899   public func vectorOfWeakReferences(at index: Int32) -> UInt64 { let o = _accessor.offset(VTOFFSET.vectorOfWeakReferences.v); return o == 0 ? 0 : _accessor.directRead(of: UInt64.self, offset: _accessor.vector(at: o) + index * 8) }
900   public var vectorOfWeakReferences: [UInt64] { return _accessor.getVector(at: VTOFFSET.vectorOfWeakReferences.v) ?? [] }
mutatenull901   public func mutate(vectorOfWeakReferences: UInt64, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.vectorOfWeakReferences.v); return _accessor.directMutate(vectorOfWeakReferences, index: _accessor.vector(at: o) + index * 8) }
902   public var vectorOfStrongReferrablesCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfStrongReferrables.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vectorOfStrongReferrablesnull903   public func vectorOfStrongReferrables(at index: Int32) -> MyGame_Example_Referrable? { let o = _accessor.offset(VTOFFSET.vectorOfStrongReferrables.v); return o == 0 ? nil : MyGame_Example_Referrable(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
vectorOfStrongReferrablesBynull904   public func vectorOfStrongReferrablesBy(key: UInt64) -> MyGame_Example_Referrable? { let o = _accessor.offset(VTOFFSET.vectorOfStrongReferrables.v); return o == 0 ? nil : MyGame_Example_Referrable.lookupByKey(vector: _accessor.vector(at: o), key: key, fbb: _accessor.bb) }
905   public var coOwningReference: UInt64 { let o = _accessor.offset(VTOFFSET.coOwningReference.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt64.self, at: o) }
mutatenull906   @discardableResult public func mutate(coOwningReference: UInt64) -> Bool {let o = _accessor.offset(VTOFFSET.coOwningReference.v);  return _accessor.mutate(coOwningReference, index: o) }
907   public var vectorOfCoOwningReferencesCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfCoOwningReferences.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vectorOfCoOwningReferencesnull908   public func vectorOfCoOwningReferences(at index: Int32) -> UInt64 { let o = _accessor.offset(VTOFFSET.vectorOfCoOwningReferences.v); return o == 0 ? 0 : _accessor.directRead(of: UInt64.self, offset: _accessor.vector(at: o) + index * 8) }
909   public var vectorOfCoOwningReferences: [UInt64] { return _accessor.getVector(at: VTOFFSET.vectorOfCoOwningReferences.v) ?? [] }
mutatenull910   public func mutate(vectorOfCoOwningReferences: UInt64, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.vectorOfCoOwningReferences.v); return _accessor.directMutate(vectorOfCoOwningReferences, index: _accessor.vector(at: o) + index * 8) }
911   public var nonOwningReference: UInt64 { let o = _accessor.offset(VTOFFSET.nonOwningReference.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt64.self, at: o) }
mutatenull912   @discardableResult public func mutate(nonOwningReference: UInt64) -> Bool {let o = _accessor.offset(VTOFFSET.nonOwningReference.v);  return _accessor.mutate(nonOwningReference, index: o) }
913   public var vectorOfNonOwningReferencesCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfNonOwningReferences.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vectorOfNonOwningReferencesnull914   public func vectorOfNonOwningReferences(at index: Int32) -> UInt64 { let o = _accessor.offset(VTOFFSET.vectorOfNonOwningReferences.v); return o == 0 ? 0 : _accessor.directRead(of: UInt64.self, offset: _accessor.vector(at: o) + index * 8) }
915   public var vectorOfNonOwningReferences: [UInt64] { return _accessor.getVector(at: VTOFFSET.vectorOfNonOwningReferences.v) ?? [] }
mutatenull916   public func mutate(vectorOfNonOwningReferences: UInt64, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.vectorOfNonOwningReferences.v); return _accessor.directMutate(vectorOfNonOwningReferences, index: _accessor.vector(at: o) + index * 8) }
917   public var anyUniqueType: MyGame_Example_AnyUniqueAliases { let o = _accessor.offset(VTOFFSET.anyUniqueType.v); return o == 0 ? .none_ : MyGame_Example_AnyUniqueAliases(rawValue: _accessor.readBuffer(of: UInt8.self, at: o)) ?? .none_ }
anyUnique<T: FlatbuffersInitializable>null918   public func anyUnique<T: FlatbuffersInitializable>(type: T.Type) -> T? { let o = _accessor.offset(VTOFFSET.anyUnique.v); return o == 0 ? nil : _accessor.union(o) }
919   public var anyAmbiguousType: MyGame_Example_AnyAmbiguousAliases { let o = _accessor.offset(VTOFFSET.anyAmbiguousType.v); return o == 0 ? .none_ : MyGame_Example_AnyAmbiguousAliases(rawValue: _accessor.readBuffer(of: UInt8.self, at: o)) ?? .none_ }
anyAmbiguous<T: FlatbuffersInitializable>null920   public func anyAmbiguous<T: FlatbuffersInitializable>(type: T.Type) -> T? { let o = _accessor.offset(VTOFFSET.anyAmbiguous.v); return o == 0 ? nil : _accessor.union(o) }
921   public var vectorOfEnumsCount: Int32 { let o = _accessor.offset(VTOFFSET.vectorOfEnums.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vectorOfEnumsnull922   public func vectorOfEnums(at index: Int32) -> MyGame_Example_Color? { let o = _accessor.offset(VTOFFSET.vectorOfEnums.v); return o == 0 ? MyGame_Example_Color.red : MyGame_Example_Color(rawValue: _accessor.directRead(of: UInt8.self, offset: _accessor.vector(at: o) + index * 1)) }
923   public var signedEnum: MyGame_Example_Race { let o = _accessor.offset(VTOFFSET.signedEnum.v); return o == 0 ? .none_ : MyGame_Example_Race(rawValue: _accessor.readBuffer(of: Int8.self, at: o)) ?? .none_ }
mutatenull924   @discardableResult public func mutate(signedEnum: MyGame_Example_Race) -> Bool {let o = _accessor.offset(VTOFFSET.signedEnum.v);  return _accessor.mutate(signedEnum.rawValue, index: o) }
925   public var testrequirednestedflatbufferCount: Int32 { let o = _accessor.offset(VTOFFSET.testrequirednestedflatbuffer.v); return o == 0 ? 0 : _accessor.vector(count: o) }
testrequirednestedflatbuffernull926   public func testrequirednestedflatbuffer(at index: Int32) -> UInt8 { let o = _accessor.offset(VTOFFSET.testrequirednestedflatbuffer.v); return o == 0 ? 0 : _accessor.directRead(of: UInt8.self, offset: _accessor.vector(at: o) + index * 1) }
927   public var testrequirednestedflatbuffer: [UInt8] { return _accessor.getVector(at: VTOFFSET.testrequirednestedflatbuffer.v) ?? [] }
mutatenull928   public func mutate(testrequirednestedflatbuffer: UInt8, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.testrequirednestedflatbuffer.v); return _accessor.directMutate(testrequirednestedflatbuffer, index: _accessor.vector(at: o) + index * 1) }
929   public var scalarKeySortedTablesCount: Int32 { let o = _accessor.offset(VTOFFSET.scalarKeySortedTables.v); return o == 0 ? 0 : _accessor.vector(count: o) }
scalarKeySortedTablesnull930   public func scalarKeySortedTables(at index: Int32) -> MyGame_Example_Stat? { let o = _accessor.offset(VTOFFSET.scalarKeySortedTables.v); return o == 0 ? nil : MyGame_Example_Stat(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
scalarKeySortedTablesBynull931   public func scalarKeySortedTablesBy(key: UInt16) -> MyGame_Example_Stat? { let o = _accessor.offset(VTOFFSET.scalarKeySortedTables.v); return o == 0 ? nil : MyGame_Example_Stat.lookupByKey(vector: _accessor.vector(at: o), key: key, fbb: _accessor.bb) }
startMonsternull932   public static func startMonster(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 51) }
addnull933   public static func add(pos: MyGame_Example_Vec3?, _ fbb: inout FlatBufferBuilder) { guard let pos = pos else { return }; fbb.create(struct: pos, position: VTOFFSET.pos.p) }
addnull934   public static func add(mana: Int16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: mana, def: 150, at: VTOFFSET.mana.p) }
addnull935   public static func add(hp: Int16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: hp, def: 100, at: VTOFFSET.hp.p) }
addnull936   public static func add(name: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: name, at: VTOFFSET.name.p) }
addVectorOfnull937   public static func addVectorOf(inventory: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: inventory, at: VTOFFSET.inventory.p) }
addnull938   public static func add(color: MyGame_Example_Color, _ fbb: inout FlatBufferBuilder) { fbb.add(element: color.rawValue, def: 8, at: VTOFFSET.color.p) }
addnull939   public static func add(testType: MyGame_Example_Any_, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testType.rawValue, def: 0, at: VTOFFSET.testType.p) }
addnull940   public static func add(test: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: test, at: VTOFFSET.test.p) }
addVectorOfnull941   public static func addVectorOf(test4: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: test4, at: VTOFFSET.test4.p) }
startVectorOfTest4null942   public static func startVectorOfTest4(_ size: Int, in builder: inout FlatBufferBuilder) {
943     builder.startVector(size * MemoryLayout<MyGame_Example_Test>.size, elementSize: MemoryLayout<MyGame_Example_Test>.alignment)
944   }
addVectorOfnull945   public static func addVectorOf(testarrayofstring: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testarrayofstring, at: VTOFFSET.testarrayofstring.p) }
addVectorOfnull946   public static func addVectorOf(testarrayoftables: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testarrayoftables, at: VTOFFSET.testarrayoftables.p) }
addnull947   public static func add(enemy: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: enemy, at: VTOFFSET.enemy.p) }
addVectorOfnull948   public static func addVectorOf(testnestedflatbuffer: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testnestedflatbuffer, at: VTOFFSET.testnestedflatbuffer.p) }
addnull949   public static func add(testempty: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testempty, at: VTOFFSET.testempty.p) }
addnull950   public static func add(testbool: Bool, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testbool, def: false,
951    at: VTOFFSET.testbool.p) }
addnull952   public static func add(testhashs32Fnv1: Int32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testhashs32Fnv1, def: 0, at: VTOFFSET.testhashs32Fnv1.p) }
addnull953   public static func add(testhashu32Fnv1: UInt32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testhashu32Fnv1, def: 0, at: VTOFFSET.testhashu32Fnv1.p) }
addnull954   public static func add(testhashs64Fnv1: Int64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testhashs64Fnv1, def: 0, at: VTOFFSET.testhashs64Fnv1.p) }
addnull955   public static func add(testhashu64Fnv1: UInt64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testhashu64Fnv1, def: 0, at: VTOFFSET.testhashu64Fnv1.p) }
addnull956   public static func add(testhashs32Fnv1a: Int32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testhashs32Fnv1a, def: 0, at: VTOFFSET.testhashs32Fnv1a.p) }
addnull957   public static func add(testhashu32Fnv1a: UInt32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testhashu32Fnv1a, def: 0, at: VTOFFSET.testhashu32Fnv1a.p) }
addnull958   public static func add(testhashs64Fnv1a: Int64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testhashs64Fnv1a, def: 0, at: VTOFFSET.testhashs64Fnv1a.p) }
addnull959   public static func add(testhashu64Fnv1a: UInt64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testhashu64Fnv1a, def: 0, at: VTOFFSET.testhashu64Fnv1a.p) }
addVectorOfnull960   public static func addVectorOf(testarrayofbools: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testarrayofbools, at: VTOFFSET.testarrayofbools.p) }
addnull961   public static func add(testf: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testf, def: 3.14159, at: VTOFFSET.testf.p) }
addnull962   public static func add(testf2: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testf2, def: 3.0, at: VTOFFSET.testf2.p) }
addnull963   public static func add(testf3: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: testf3, def: 0.0, at: VTOFFSET.testf3.p) }
addVectorOfnull964   public static func addVectorOf(testarrayofstring2: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testarrayofstring2, at: VTOFFSET.testarrayofstring2.p) }
addVectorOfnull965   public static func addVectorOf(testarrayofsortedstruct: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testarrayofsortedstruct, at: VTOFFSET.testarrayofsortedstruct.p) }
startVectorOfTestarrayofsortedstructnull966   public static func startVectorOfTestarrayofsortedstruct(_ size: Int, in builder: inout FlatBufferBuilder) {
967     builder.startVector(size * MemoryLayout<MyGame_Example_Ability>.size, elementSize: MemoryLayout<MyGame_Example_Ability>.alignment)
968   }
addVectorOfnull969   public static func addVectorOf(flex: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: flex, at: VTOFFSET.flex.p) }
addVectorOfnull970   public static func addVectorOf(test5: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: test5, at: VTOFFSET.test5.p) }
startVectorOfTest5null971   public static func startVectorOfTest5(_ size: Int, in builder: inout FlatBufferBuilder) {
972     builder.startVector(size * MemoryLayout<MyGame_Example_Test>.size, elementSize: MemoryLayout<MyGame_Example_Test>.alignment)
973   }
addVectorOfnull974   public static func addVectorOf(vectorOfLongs: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vectorOfLongs, at: VTOFFSET.vectorOfLongs.p) }
addVectorOfnull975   public static func addVectorOf(vectorOfDoubles: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vectorOfDoubles, at: VTOFFSET.vectorOfDoubles.p) }
addnull976   public static func add(parentNamespaceTest: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: parentNamespaceTest, at: VTOFFSET.parentNamespaceTest.p) }
addVectorOfnull977   public static func addVectorOf(vectorOfReferrables: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vectorOfReferrables, at: VTOFFSET.vectorOfReferrables.p) }
addnull978   public static func add(singleWeakReference: UInt64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: singleWeakReference, def: 0, at: VTOFFSET.singleWeakReference.p) }
addVectorOfnull979   public static func addVectorOf(vectorOfWeakReferences: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vectorOfWeakReferences, at: VTOFFSET.vectorOfWeakReferences.p) }
addVectorOfnull980   public static func addVectorOf(vectorOfStrongReferrables: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vectorOfStrongReferrables, at: VTOFFSET.vectorOfStrongReferrables.p) }
addnull981   public static func add(coOwningReference: UInt64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: coOwningReference, def: 0, at: VTOFFSET.coOwningReference.p) }
addVectorOfnull982   public static func addVectorOf(vectorOfCoOwningReferences: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vectorOfCoOwningReferences, at: VTOFFSET.vectorOfCoOwningReferences.p) }
addnull983   public static func add(nonOwningReference: UInt64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: nonOwningReference, def: 0, at: VTOFFSET.nonOwningReference.p) }
addVectorOfnull984   public static func addVectorOf(vectorOfNonOwningReferences: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vectorOfNonOwningReferences, at: VTOFFSET.vectorOfNonOwningReferences.p) }
addnull985   public static func add(anyUniqueType: MyGame_Example_AnyUniqueAliases, _ fbb: inout FlatBufferBuilder) { fbb.add(element: anyUniqueType.rawValue, def: 0, at: VTOFFSET.anyUniqueType.p) }
addnull986   public static func add(anyUnique: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: anyUnique, at: VTOFFSET.anyUnique.p) }
addnull987   public static func add(anyAmbiguousType: MyGame_Example_AnyAmbiguousAliases, _ fbb: inout FlatBufferBuilder) { fbb.add(element: anyAmbiguousType.rawValue, def: 0, at: VTOFFSET.anyAmbiguousType.p) }
addnull988   public static func add(anyAmbiguous: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: anyAmbiguous, at: VTOFFSET.anyAmbiguous.p) }
addVectorOfnull989   public static func addVectorOf(vectorOfEnums: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vectorOfEnums, at: VTOFFSET.vectorOfEnums.p) }
addnull990   public static func add(signedEnum: MyGame_Example_Race, _ fbb: inout FlatBufferBuilder) { fbb.add(element: signedEnum.rawValue, def: -1, at: VTOFFSET.signedEnum.p) }
addVectorOfnull991   public static func addVectorOf(testrequirednestedflatbuffer: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: testrequirednestedflatbuffer, at: VTOFFSET.testrequirednestedflatbuffer.p) }
addVectorOfnull992   public static func addVectorOf(scalarKeySortedTables: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: scalarKeySortedTables, at: VTOFFSET.scalarKeySortedTables.p) }
endMonsternull993   public static func endMonster(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); fbb.require(table: end, fields: [10]); return end }
994   public static func createMonster(
995     _ fbb: inout FlatBufferBuilder,
996     pos: MyGame_Example_Vec3? = nil,
997     mana: Int16 = 150,
998     hp: Int16 = 100,
999     nameOffset name: Offset = Offset(),
1000     inventoryVectorOffset inventory: Offset = Offset(),
1001     color: MyGame_Example_Color = .blue,
1002     testType: MyGame_Example_Any_ = .none_,
1003     testOffset test: Offset = Offset(),
1004     test4VectorOffset test4: Offset = Offset(),
1005     testarrayofstringVectorOffset testarrayofstring: Offset = Offset(),
1006     testarrayoftablesVectorOffset testarrayoftables: Offset = Offset(),
1007     enemyOffset enemy: Offset = Offset(),
1008     testnestedflatbufferVectorOffset testnestedflatbuffer: Offset = Offset(),
1009     testemptyOffset testempty: Offset = Offset(),
1010     testbool: Bool = false,
1011     testhashs32Fnv1: Int32 = 0,
1012     testhashu32Fnv1: UInt32 = 0,
1013     testhashs64Fnv1: Int64 = 0,
1014     testhashu64Fnv1: UInt64 = 0,
1015     testhashs32Fnv1a: Int32 = 0,
1016     testhashu32Fnv1a: UInt32 = 0,
1017     testhashs64Fnv1a: Int64 = 0,
1018     testhashu64Fnv1a: UInt64 = 0,
1019     testarrayofboolsVectorOffset testarrayofbools: Offset = Offset(),
1020     testf: Float32 = 3.14159,
1021     testf2: Float32 = 3.0,
1022     testf3: Float32 = 0.0,
1023     testarrayofstring2VectorOffset testarrayofstring2: Offset = Offset(),
1024     testarrayofsortedstructVectorOffset testarrayofsortedstruct: Offset = Offset(),
1025     flexVectorOffset flex: Offset = Offset(),
1026     test5VectorOffset test5: Offset = Offset(),
1027     vectorOfLongsVectorOffset vectorOfLongs: Offset = Offset(),
1028     vectorOfDoublesVectorOffset vectorOfDoubles: Offset = Offset(),
1029     parentNamespaceTestOffset parentNamespaceTest: Offset = Offset(),
1030     vectorOfReferrablesVectorOffset vectorOfReferrables: Offset = Offset(),
1031     singleWeakReference: UInt64 = 0,
1032     vectorOfWeakReferencesVectorOffset vectorOfWeakReferences: Offset = Offset(),
1033     vectorOfStrongReferrablesVectorOffset vectorOfStrongReferrables: Offset = Offset(),
1034     coOwningReference: UInt64 = 0,
1035     vectorOfCoOwningReferencesVectorOffset vectorOfCoOwningReferences: Offset = Offset(),
1036     nonOwningReference: UInt64 = 0,
1037     vectorOfNonOwningReferencesVectorOffset vectorOfNonOwningReferences: Offset = Offset(),
1038     anyUniqueType: MyGame_Example_AnyUniqueAliases = .none_,
1039     anyUniqueOffset anyUnique: Offset = Offset(),
1040     anyAmbiguousType: MyGame_Example_AnyAmbiguousAliases = .none_,
1041     anyAmbiguousOffset anyAmbiguous: Offset = Offset(),
1042     vectorOfEnumsVectorOffset vectorOfEnums: Offset = Offset(),
1043     signedEnum: MyGame_Example_Race = .none_,
1044     testrequirednestedflatbufferVectorOffset testrequirednestedflatbuffer: Offset = Offset(),
1045     scalarKeySortedTablesVectorOffset scalarKeySortedTables: Offset = Offset()
1046   ) -> Offset {
1047     let __start = MyGame_Example_Monster.startMonster(&fbb)
1048     MyGame_Example_Monster.add(pos: pos, &fbb)
1049     MyGame_Example_Monster.add(mana: mana, &fbb)
1050     MyGame_Example_Monster.add(hp: hp, &fbb)
1051     MyGame_Example_Monster.add(name: name, &fbb)
1052     MyGame_Example_Monster.addVectorOf(inventory: inventory, &fbb)
1053     MyGame_Example_Monster.add(color: color, &fbb)
1054     MyGame_Example_Monster.add(testType: testType, &fbb)
1055     MyGame_Example_Monster.add(test: test, &fbb)
1056     MyGame_Example_Monster.addVectorOf(test4: test4, &fbb)
1057     MyGame_Example_Monster.addVectorOf(testarrayofstring: testarrayofstring, &fbb)
1058     MyGame_Example_Monster.addVectorOf(testarrayoftables: testarrayoftables, &fbb)
1059     MyGame_Example_Monster.add(enemy: enemy, &fbb)
1060     MyGame_Example_Monster.addVectorOf(testnestedflatbuffer: testnestedflatbuffer, &fbb)
1061     MyGame_Example_Monster.add(testempty: testempty, &fbb)
1062     MyGame_Example_Monster.add(testbool: testbool, &fbb)
1063     MyGame_Example_Monster.add(testhashs32Fnv1: testhashs32Fnv1, &fbb)
1064     MyGame_Example_Monster.add(testhashu32Fnv1: testhashu32Fnv1, &fbb)
1065     MyGame_Example_Monster.add(testhashs64Fnv1: testhashs64Fnv1, &fbb)
1066     MyGame_Example_Monster.add(testhashu64Fnv1: testhashu64Fnv1, &fbb)
1067     MyGame_Example_Monster.add(testhashs32Fnv1a: testhashs32Fnv1a, &fbb)
1068     MyGame_Example_Monster.add(testhashu32Fnv1a: testhashu32Fnv1a, &fbb)
1069     MyGame_Example_Monster.add(testhashs64Fnv1a: testhashs64Fnv1a, &fbb)
1070     MyGame_Example_Monster.add(testhashu64Fnv1a: testhashu64Fnv1a, &fbb)
1071     MyGame_Example_Monster.addVectorOf(testarrayofbools: testarrayofbools, &fbb)
1072     MyGame_Example_Monster.add(testf: testf, &fbb)
1073     MyGame_Example_Monster.add(testf2: testf2, &fbb)
1074     MyGame_Example_Monster.add(testf3: testf3, &fbb)
1075     MyGame_Example_Monster.addVectorOf(testarrayofstring2: testarrayofstring2, &fbb)
1076     MyGame_Example_Monster.addVectorOf(testarrayofsortedstruct: testarrayofsortedstruct, &fbb)
1077     MyGame_Example_Monster.addVectorOf(flex: flex, &fbb)
1078     MyGame_Example_Monster.addVectorOf(test5: test5, &fbb)
1079     MyGame_Example_Monster.addVectorOf(vectorOfLongs: vectorOfLongs, &fbb)
1080     MyGame_Example_Monster.addVectorOf(vectorOfDoubles: vectorOfDoubles, &fbb)
1081     MyGame_Example_Monster.add(parentNamespaceTest: parentNamespaceTest, &fbb)
1082     MyGame_Example_Monster.addVectorOf(vectorOfReferrables: vectorOfReferrables, &fbb)
1083     MyGame_Example_Monster.add(singleWeakReference: singleWeakReference, &fbb)
1084     MyGame_Example_Monster.addVectorOf(vectorOfWeakReferences: vectorOfWeakReferences, &fbb)
1085     MyGame_Example_Monster.addVectorOf(vectorOfStrongReferrables: vectorOfStrongReferrables, &fbb)
1086     MyGame_Example_Monster.add(coOwningReference: coOwningReference, &fbb)
1087     MyGame_Example_Monster.addVectorOf(vectorOfCoOwningReferences: vectorOfCoOwningReferences, &fbb)
1088     MyGame_Example_Monster.add(nonOwningReference: nonOwningReference, &fbb)
1089     MyGame_Example_Monster.addVectorOf(vectorOfNonOwningReferences: vectorOfNonOwningReferences, &fbb)
1090     MyGame_Example_Monster.add(anyUniqueType: anyUniqueType, &fbb)
1091     MyGame_Example_Monster.add(anyUnique: anyUnique, &fbb)
1092     MyGame_Example_Monster.add(anyAmbiguousType: anyAmbiguousType, &fbb)
1093     MyGame_Example_Monster.add(anyAmbiguous: anyAmbiguous, &fbb)
1094     MyGame_Example_Monster.addVectorOf(vectorOfEnums: vectorOfEnums, &fbb)
1095     MyGame_Example_Monster.add(signedEnum: signedEnum, &fbb)
1096     MyGame_Example_Monster.addVectorOf(testrequirednestedflatbuffer: testrequirednestedflatbuffer, &fbb)
1097     MyGame_Example_Monster.addVectorOf(scalarKeySortedTables: scalarKeySortedTables, &fbb)
1098     return MyGame_Example_Monster.endMonster(&fbb, start: __start)
1099   }
sortVectorOfMonsternull1100   public static func sortVectorOfMonster(offsets:[Offset], _ fbb: inout FlatBufferBuilder) -> Offset {
1101     var off = offsets
1102     off.sort { Table.compare(Table.offset(Int32($1.o), vOffset: 10, fbb: fbb.buffer), Table.offset(Int32($0.o), vOffset: 10, fbb: fbb.buffer), fbb: fbb.buffer) < 0 }
1103     return fbb.createVector(ofOffsets: off)
1104   }
lookupByKeynull1105   fileprivate static func lookupByKey(vector: Int32, key: String, fbb: ByteBuffer) -> MyGame_Example_Monster? {
1106     let key = key.utf8.map { $0 }
1107     var span = fbb.read(def: Int32.self, position: Int(vector - 4))
1108     var start: Int32 = 0
1109     while span != 0 {
1110       var middle = span / 2
1111       let tableOffset = Table.indirect(vector + 4 * (start + middle), fbb)
1112       let comp = Table.compare(Table.offset(Int32(fbb.capacity) - tableOffset, vOffset: 10, fbb: fbb), key, fbb: fbb)
1113       if comp > 0 {
1114         span = middle
1115       } else if comp < 0 {
1116         middle += 1
1117         start += middle
1118         span -= middle
1119       } else {
1120         return MyGame_Example_Monster(fbb, o: tableOffset)
1121       }
1122     }
1123     return nil
1124   }
1125 
1126 
unpacknull1127   public mutating func unpack() -> MyGame_Example_MonsterT {
1128     return MyGame_Example_MonsterT(&self)
1129   }
packnull1130   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_MonsterT?) -> Offset {
1131     guard var obj = obj else { return Offset() }
1132     return pack(&builder, obj: &obj)
1133   }
1134 
packnull1135   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_MonsterT) -> Offset {
1136     let __name = builder.create(string: obj.name)
1137     let __inventory = builder.createVector(obj.inventory)
1138     let __test = obj.test?.pack(builder: &builder) ?? Offset()
1139     MyGame_Example_Monster.startVectorOfTest4(obj.test4.count, in: &builder)
1140     for i in obj.test4 {
1141       guard let _o = i else { continue }
1142       builder.create(struct: _o)
1143     }
1144     let __test4 = builder.endVector(len: obj.test4.count)
1145     let __testarrayofstring = builder.createVector(ofStrings: obj.testarrayofstring.compactMap({ $0 }) )
1146     var __testarrayoftables__: [Offset] = []
1147     for var i in obj.testarrayoftables {
1148       __testarrayoftables__.append(MyGame_Example_Monster.pack(&builder, obj: &i))
1149     }
1150     let __testarrayoftables = builder.createVector(ofOffsets: __testarrayoftables__)
1151     let __enemy = MyGame_Example_Monster.pack(&builder, obj: &obj.enemy)
1152     let __testnestedflatbuffer = builder.createVector(obj.testnestedflatbuffer)
1153     let __testempty = MyGame_Example_Stat.pack(&builder, obj: &obj.testempty)
1154     let __testarrayofbools = builder.createVector(obj.testarrayofbools)
1155     let __testarrayofstring2 = builder.createVector(ofStrings: obj.testarrayofstring2.compactMap({ $0 }) )
1156     MyGame_Example_Monster.startVectorOfTestarrayofsortedstruct(obj.testarrayofsortedstruct.count, in: &builder)
1157     for i in obj.testarrayofsortedstruct {
1158       guard let _o = i else { continue }
1159       builder.create(struct: _o)
1160     }
1161     let __testarrayofsortedstruct = builder.endVector(len: obj.testarrayofsortedstruct.count)
1162     let __flex = builder.createVector(obj.flex)
1163     MyGame_Example_Monster.startVectorOfTest5(obj.test5.count, in: &builder)
1164     for i in obj.test5 {
1165       guard let _o = i else { continue }
1166       builder.create(struct: _o)
1167     }
1168     let __test5 = builder.endVector(len: obj.test5.count)
1169     let __vectorOfLongs = builder.createVector(obj.vectorOfLongs)
1170     let __vectorOfDoubles = builder.createVector(obj.vectorOfDoubles)
1171     let __parentNamespaceTest = MyGame_InParentNamespace.pack(&builder, obj: &obj.parentNamespaceTest)
1172     var __vectorOfReferrables__: [Offset] = []
1173     for var i in obj.vectorOfReferrables {
1174       __vectorOfReferrables__.append(MyGame_Example_Referrable.pack(&builder, obj: &i))
1175     }
1176     let __vectorOfReferrables = builder.createVector(ofOffsets: __vectorOfReferrables__)
1177     let __vectorOfWeakReferences = builder.createVector(obj.vectorOfWeakReferences)
1178     var __vectorOfStrongReferrables__: [Offset] = []
1179     for var i in obj.vectorOfStrongReferrables {
1180       __vectorOfStrongReferrables__.append(MyGame_Example_Referrable.pack(&builder, obj: &i))
1181     }
1182     let __vectorOfStrongReferrables = builder.createVector(ofOffsets: __vectorOfStrongReferrables__)
1183     let __vectorOfCoOwningReferences = builder.createVector(obj.vectorOfCoOwningReferences)
1184     let __vectorOfNonOwningReferences = builder.createVector(obj.vectorOfNonOwningReferences)
1185     let __anyUnique = obj.anyUnique?.pack(builder: &builder) ?? Offset()
1186     let __anyAmbiguous = obj.anyAmbiguous?.pack(builder: &builder) ?? Offset()
1187     let __vectorOfEnums = builder.createVector(obj.vectorOfEnums)
1188     let __testrequirednestedflatbuffer = builder.createVector(obj.testrequirednestedflatbuffer)
1189     var __scalarKeySortedTables__: [Offset] = []
1190     for var i in obj.scalarKeySortedTables {
1191       __scalarKeySortedTables__.append(MyGame_Example_Stat.pack(&builder, obj: &i))
1192     }
1193     let __scalarKeySortedTables = builder.createVector(ofOffsets: __scalarKeySortedTables__)
1194     let __root = MyGame_Example_Monster.startMonster(&builder)
1195     MyGame_Example_Monster.add(pos: obj.pos, &builder)
1196     MyGame_Example_Monster.add(mana: obj.mana, &builder)
1197     MyGame_Example_Monster.add(hp: obj.hp, &builder)
1198     MyGame_Example_Monster.add(name: __name, &builder)
1199     MyGame_Example_Monster.addVectorOf(inventory: __inventory, &builder)
1200     MyGame_Example_Monster.add(color: obj.color, &builder)
1201     if let o = obj.test?.type {
1202       MyGame_Example_Monster.add(testType: o, &builder)
1203       MyGame_Example_Monster.add(test: __test, &builder)
1204     }
1205 
1206     MyGame_Example_Monster.addVectorOf(test4: __test4, &builder)
1207     MyGame_Example_Monster.addVectorOf(testarrayofstring: __testarrayofstring, &builder)
1208     MyGame_Example_Monster.addVectorOf(testarrayoftables: __testarrayoftables, &builder)
1209     MyGame_Example_Monster.add(enemy: __enemy, &builder)
1210     MyGame_Example_Monster.addVectorOf(testnestedflatbuffer: __testnestedflatbuffer, &builder)
1211     MyGame_Example_Monster.add(testempty: __testempty, &builder)
1212     MyGame_Example_Monster.add(testbool: obj.testbool, &builder)
1213     MyGame_Example_Monster.add(testhashs32Fnv1: obj.testhashs32Fnv1, &builder)
1214     MyGame_Example_Monster.add(testhashu32Fnv1: obj.testhashu32Fnv1, &builder)
1215     MyGame_Example_Monster.add(testhashs64Fnv1: obj.testhashs64Fnv1, &builder)
1216     MyGame_Example_Monster.add(testhashu64Fnv1: obj.testhashu64Fnv1, &builder)
1217     MyGame_Example_Monster.add(testhashs32Fnv1a: obj.testhashs32Fnv1a, &builder)
1218     MyGame_Example_Monster.add(testhashu32Fnv1a: obj.testhashu32Fnv1a, &builder)
1219     MyGame_Example_Monster.add(testhashs64Fnv1a: obj.testhashs64Fnv1a, &builder)
1220     MyGame_Example_Monster.add(testhashu64Fnv1a: obj.testhashu64Fnv1a, &builder)
1221     MyGame_Example_Monster.addVectorOf(testarrayofbools: __testarrayofbools, &builder)
1222     MyGame_Example_Monster.add(testf: obj.testf, &builder)
1223     MyGame_Example_Monster.add(testf2: obj.testf2, &builder)
1224     MyGame_Example_Monster.add(testf3: obj.testf3, &builder)
1225     MyGame_Example_Monster.addVectorOf(testarrayofstring2: __testarrayofstring2, &builder)
1226     MyGame_Example_Monster.addVectorOf(testarrayofsortedstruct: __testarrayofsortedstruct, &builder)
1227     MyGame_Example_Monster.addVectorOf(flex: __flex, &builder)
1228     MyGame_Example_Monster.addVectorOf(test5: __test5, &builder)
1229     MyGame_Example_Monster.addVectorOf(vectorOfLongs: __vectorOfLongs, &builder)
1230     MyGame_Example_Monster.addVectorOf(vectorOfDoubles: __vectorOfDoubles, &builder)
1231     MyGame_Example_Monster.add(parentNamespaceTest: __parentNamespaceTest, &builder)
1232     MyGame_Example_Monster.addVectorOf(vectorOfReferrables: __vectorOfReferrables, &builder)
1233     MyGame_Example_Monster.add(singleWeakReference: obj.singleWeakReference, &builder)
1234     MyGame_Example_Monster.addVectorOf(vectorOfWeakReferences: __vectorOfWeakReferences, &builder)
1235     MyGame_Example_Monster.addVectorOf(vectorOfStrongReferrables: __vectorOfStrongReferrables, &builder)
1236     MyGame_Example_Monster.add(coOwningReference: obj.coOwningReference, &builder)
1237     MyGame_Example_Monster.addVectorOf(vectorOfCoOwningReferences: __vectorOfCoOwningReferences, &builder)
1238     MyGame_Example_Monster.add(nonOwningReference: obj.nonOwningReference, &builder)
1239     MyGame_Example_Monster.addVectorOf(vectorOfNonOwningReferences: __vectorOfNonOwningReferences, &builder)
1240     if let o = obj.anyUnique?.type {
1241       MyGame_Example_Monster.add(anyUniqueType: o, &builder)
1242       MyGame_Example_Monster.add(anyUnique: __anyUnique, &builder)
1243     }
1244 
1245     if let o = obj.anyAmbiguous?.type {
1246       MyGame_Example_Monster.add(anyAmbiguousType: o, &builder)
1247       MyGame_Example_Monster.add(anyAmbiguous: __anyAmbiguous, &builder)
1248     }
1249 
1250     MyGame_Example_Monster.addVectorOf(vectorOfEnums: __vectorOfEnums, &builder)
1251     MyGame_Example_Monster.add(signedEnum: obj.signedEnum, &builder)
1252     MyGame_Example_Monster.addVectorOf(testrequirednestedflatbuffer: __testrequirednestedflatbuffer, &builder)
1253     MyGame_Example_Monster.addVectorOf(scalarKeySortedTables: __scalarKeySortedTables, &builder)
1254     return MyGame_Example_Monster.endMonster(&builder, start: __root)
1255   }
1256 }
1257 
1258 public class MyGame_Example_MonsterT: NativeObject {
1259 
1260   public var pos: MyGame_Example_Vec3?
1261   public var mana: Int16
1262   public var hp: Int16
1263   public var name: String
1264   public var inventory: [UInt8]
1265   public var color: MyGame_Example_Color
1266   public var test: MyGame_Example_Any_Union?
1267   public var test4: [MyGame_Example_Test?]
1268   public var testarrayofstring: [String?]
1269   public var testarrayoftables: [MyGame_Example_MonsterT?]
1270   public var enemy: MyGame_Example_MonsterT?
1271   public var testnestedflatbuffer: [UInt8]
1272   public var testempty: MyGame_Example_StatT?
1273   public var testbool: Bool
1274   public var testhashs32Fnv1: Int32
1275   public var testhashu32Fnv1: UInt32
1276   public var testhashs64Fnv1: Int64
1277   public var testhashu64Fnv1: UInt64
1278   public var testhashs32Fnv1a: Int32
1279   public var testhashu32Fnv1a: UInt32
1280   public var testhashs64Fnv1a: Int64
1281   public var testhashu64Fnv1a: UInt64
1282   public var testarrayofbools: [Bool]
1283   public var testf: Float32
1284   public var testf2: Float32
1285   public var testf3: Float32
1286   public var testarrayofstring2: [String?]
1287   public var testarrayofsortedstruct: [MyGame_Example_Ability?]
1288   public var flex: [UInt8]
1289   public var test5: [MyGame_Example_Test?]
1290   public var vectorOfLongs: [Int64]
1291   public var vectorOfDoubles: [Double]
1292   public var parentNamespaceTest: MyGame_InParentNamespaceT?
1293   public var vectorOfReferrables: [MyGame_Example_ReferrableT?]
1294   public var singleWeakReference: UInt64
1295   public var vectorOfWeakReferences: [UInt64]
1296   public var vectorOfStrongReferrables: [MyGame_Example_ReferrableT?]
1297   public var coOwningReference: UInt64
1298   public var vectorOfCoOwningReferences: [UInt64]
1299   public var nonOwningReference: UInt64
1300   public var vectorOfNonOwningReferences: [UInt64]
1301   public var anyUnique: MyGame_Example_AnyUniqueAliasesUnion?
1302   public var anyAmbiguous: MyGame_Example_AnyAmbiguousAliasesUnion?
1303   public var vectorOfEnums: [MyGame_Example_Color]
1304   public var signedEnum: MyGame_Example_Race
1305   public var testrequirednestedflatbuffer: [UInt8]
1306   public var scalarKeySortedTables: [MyGame_Example_StatT?]
1307 
1308   public init(_ _t: inout MyGame_Example_Monster) {
1309     pos = _t.pos
1310     mana = _t.mana
1311     hp = _t.hp
1312     name = _t.name
1313     inventory = []
1314     for index in 0..<_t.inventoryCount {
1315         inventory.append(_t.inventory(at: index))
1316     }
1317     color = _t.color
1318     switch _t.testType {
1319     case .monster:
1320       var _v = _t.test(type: MyGame_Example_Monster.self)
1321       test = MyGame_Example_Any_Union(_v?.unpack(), type: .monster)
1322     case .testsimpletablewithenum:
1323       var _v = _t.test(type: MyGame_Example_TestSimpleTableWithEnum.self)
1324       test = MyGame_Example_Any_Union(_v?.unpack(), type: .testsimpletablewithenum)
1325     case .mygameExample2Monster:
1326       var _v = _t.test(type: MyGame_Example2_Monster.self)
1327       test = MyGame_Example_Any_Union(_v?.unpack(), type: .mygameExample2Monster)
1328     default: break
1329     }
1330     test4 = []
1331     for index in 0..<_t.test4Count {
1332         test4.append(_t.test4(at: index))
1333     }
1334     testarrayofstring = []
1335     for index in 0..<_t.testarrayofstringCount {
1336         testarrayofstring.append(_t.testarrayofstring(at: index))
1337     }
1338     testarrayoftables = []
1339     for index in 0..<_t.testarrayoftablesCount {
1340         var __v_ = _t.testarrayoftables(at: index)
1341         testarrayoftables.append(__v_?.unpack())
1342     }
1343     var __enemy = _t.enemy
1344     enemy = __enemy?.unpack()
1345     testnestedflatbuffer = []
1346     for index in 0..<_t.testnestedflatbufferCount {
1347         testnestedflatbuffer.append(_t.testnestedflatbuffer(at: index))
1348     }
1349     var __testempty = _t.testempty
1350     testempty = __testempty?.unpack()
1351     testbool = _t.testbool
1352     testhashs32Fnv1 = _t.testhashs32Fnv1
1353     testhashu32Fnv1 = _t.testhashu32Fnv1
1354     testhashs64Fnv1 = _t.testhashs64Fnv1
1355     testhashu64Fnv1 = _t.testhashu64Fnv1
1356     testhashs32Fnv1a = _t.testhashs32Fnv1a
1357     testhashu32Fnv1a = _t.testhashu32Fnv1a
1358     testhashs64Fnv1a = _t.testhashs64Fnv1a
1359     testhashu64Fnv1a = _t.testhashu64Fnv1a
1360     testarrayofbools = []
1361     for index in 0..<_t.testarrayofboolsCount {
1362         testarrayofbools.append(_t.testarrayofbools(at: index))
1363     }
1364     testf = _t.testf
1365     testf2 = _t.testf2
1366     testf3 = _t.testf3
1367     testarrayofstring2 = []
1368     for index in 0..<_t.testarrayofstring2Count {
1369         testarrayofstring2.append(_t.testarrayofstring2(at: index))
1370     }
1371     testarrayofsortedstruct = []
1372     for index in 0..<_t.testarrayofsortedstructCount {
1373         testarrayofsortedstruct.append(_t.testarrayofsortedstruct(at: index))
1374     }
1375     flex = []
1376     for index in 0..<_t.flexCount {
1377         flex.append(_t.flex(at: index))
1378     }
1379     test5 = []
1380     for index in 0..<_t.test5Count {
1381         test5.append(_t.test5(at: index))
1382     }
1383     vectorOfLongs = []
1384     for index in 0..<_t.vectorOfLongsCount {
1385         vectorOfLongs.append(_t.vectorOfLongs(at: index))
1386     }
1387     vectorOfDoubles = []
1388     for index in 0..<_t.vectorOfDoublesCount {
1389         vectorOfDoubles.append(_t.vectorOfDoubles(at: index))
1390     }
1391     var __parentNamespaceTest = _t.parentNamespaceTest
1392     parentNamespaceTest = __parentNamespaceTest?.unpack()
1393     vectorOfReferrables = []
1394     for index in 0..<_t.vectorOfReferrablesCount {
1395         var __v_ = _t.vectorOfReferrables(at: index)
1396         vectorOfReferrables.append(__v_?.unpack())
1397     }
1398     singleWeakReference = _t.singleWeakReference
1399     vectorOfWeakReferences = []
1400     for index in 0..<_t.vectorOfWeakReferencesCount {
1401         vectorOfWeakReferences.append(_t.vectorOfWeakReferences(at: index))
1402     }
1403     vectorOfStrongReferrables = []
1404     for index in 0..<_t.vectorOfStrongReferrablesCount {
1405         var __v_ = _t.vectorOfStrongReferrables(at: index)
1406         vectorOfStrongReferrables.append(__v_?.unpack())
1407     }
1408     coOwningReference = _t.coOwningReference
1409     vectorOfCoOwningReferences = []
1410     for index in 0..<_t.vectorOfCoOwningReferencesCount {
1411         vectorOfCoOwningReferences.append(_t.vectorOfCoOwningReferences(at: index))
1412     }
1413     nonOwningReference = _t.nonOwningReference
1414     vectorOfNonOwningReferences = []
1415     for index in 0..<_t.vectorOfNonOwningReferencesCount {
1416         vectorOfNonOwningReferences.append(_t.vectorOfNonOwningReferences(at: index))
1417     }
1418     switch _t.anyUniqueType {
1419     case .m:
1420       var _v = _t.anyUnique(type: MyGame_Example_Monster.self)
1421       anyUnique = MyGame_Example_AnyUniqueAliasesUnion(_v?.unpack(), type: .m)
1422     case .ts:
1423       var _v = _t.anyUnique(type: MyGame_Example_TestSimpleTableWithEnum.self)
1424       anyUnique = MyGame_Example_AnyUniqueAliasesUnion(_v?.unpack(), type: .ts)
1425     case .m2:
1426       var _v = _t.anyUnique(type: MyGame_Example2_Monster.self)
1427       anyUnique = MyGame_Example_AnyUniqueAliasesUnion(_v?.unpack(), type: .m2)
1428     default: break
1429     }
1430     switch _t.anyAmbiguousType {
1431     case .m1:
1432       var _v = _t.anyAmbiguous(type: MyGame_Example_Monster.self)
1433       anyAmbiguous = MyGame_Example_AnyAmbiguousAliasesUnion(_v?.unpack(), type: .m1)
1434     case .m2:
1435       var _v = _t.anyAmbiguous(type: MyGame_Example_Monster.self)
1436       anyAmbiguous = MyGame_Example_AnyAmbiguousAliasesUnion(_v?.unpack(), type: .m2)
1437     case .m3:
1438       var _v = _t.anyAmbiguous(type: MyGame_Example_Monster.self)
1439       anyAmbiguous = MyGame_Example_AnyAmbiguousAliasesUnion(_v?.unpack(), type: .m3)
1440     default: break
1441     }
1442     vectorOfEnums = []
1443     for index in 0..<_t.vectorOfEnumsCount {
1444         vectorOfEnums.append(_t.vectorOfEnums(at: index)!)
1445     }
1446     signedEnum = _t.signedEnum
1447     testrequirednestedflatbuffer = []
1448     for index in 0..<_t.testrequirednestedflatbufferCount {
1449         testrequirednestedflatbuffer.append(_t.testrequirednestedflatbuffer(at: index))
1450     }
1451     scalarKeySortedTables = []
1452     for index in 0..<_t.scalarKeySortedTablesCount {
1453         var __v_ = _t.scalarKeySortedTables(at: index)
1454         scalarKeySortedTables.append(__v_?.unpack())
1455     }
1456   }
1457 
1458   public init() {
1459     pos = MyGame_Example_Vec3()
1460     mana = 150
1461     hp = 100
1462     name = ""
1463     inventory = []
1464     color = .blue
1465     test4 = []
1466     testarrayofstring = []
1467     testarrayoftables = []
1468     enemy = MyGame_Example_MonsterT()
1469     testnestedflatbuffer = []
1470     testempty = MyGame_Example_StatT()
1471     testbool = false
1472     testhashs32Fnv1 = 0
1473     testhashu32Fnv1 = 0
1474     testhashs64Fnv1 = 0
1475     testhashu64Fnv1 = 0
1476     testhashs32Fnv1a = 0
1477     testhashu32Fnv1a = 0
1478     testhashs64Fnv1a = 0
1479     testhashu64Fnv1a = 0
1480     testarrayofbools = []
1481     testf = 3.14159
1482     testf2 = 3.0
1483     testf3 = 0.0
1484     testarrayofstring2 = []
1485     testarrayofsortedstruct = []
1486     flex = []
1487     test5 = []
1488     vectorOfLongs = []
1489     vectorOfDoubles = []
1490     parentNamespaceTest = MyGame_InParentNamespaceT()
1491     vectorOfReferrables = []
1492     singleWeakReference = 0
1493     vectorOfWeakReferences = []
1494     vectorOfStrongReferrables = []
1495     coOwningReference = 0
1496     vectorOfCoOwningReferences = []
1497     nonOwningReference = 0
1498     vectorOfNonOwningReferences = []
1499     vectorOfEnums = []
1500     signedEnum = .none_
1501     testrequirednestedflatbuffer = []
1502     scalarKeySortedTables = []
1503   }
1504 
serializenull1505   public func serialize() -> ByteBuffer { return serialize(type: MyGame_Example_Monster.self) }
1506 
1507 }
1508 public struct MyGame_Example_TypeAliases: FlatBufferObject, ObjectAPIPacker {
1509 
validateVersionnull1510   static func validateVersion() { FlatBuffersVersion_2_0_0() }
1511   public var __buffer: ByteBuffer! { return _accessor.bb }
1512   private var _accessor: Table
1513 
finishnull1514   public static func finish(_ fbb: inout FlatBufferBuilder, end: Offset, prefix: Bool = false) { fbb.finish(offset: end, fileId: "MONS", addPrefix: prefix) }
getRootAsTypeAliasesnull1515   public static func getRootAsTypeAliases(bb: ByteBuffer) -> MyGame_Example_TypeAliases { return MyGame_Example_TypeAliases(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
1516 
1517   private init(_ t: Table) { _accessor = t }
1518   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
1519 
1520   private enum VTOFFSET: VOffset {
1521     case i8 = 4
1522     case u8 = 6
1523     case i16 = 8
1524     case u16 = 10
1525     case i32 = 12
1526     case u32 = 14
1527     case i64 = 16
1528     case u64 = 18
1529     case f32 = 20
1530     case f64 = 22
1531     case v8 = 24
1532     case vf64 = 26
1533     var v: Int32 { Int32(self.rawValue) }
1534     var p: VOffset { self.rawValue }
1535   }
1536 
1537   public var i8: Int8 { let o = _accessor.offset(VTOFFSET.i8.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int8.self, at: o) }
mutatenull1538   @discardableResult public func mutate(i8: Int8) -> Bool {let o = _accessor.offset(VTOFFSET.i8.v);  return _accessor.mutate(i8, index: o) }
1539   public var u8: UInt8 { let o = _accessor.offset(VTOFFSET.u8.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt8.self, at: o) }
mutatenull1540   @discardableResult public func mutate(u8: UInt8) -> Bool {let o = _accessor.offset(VTOFFSET.u8.v);  return _accessor.mutate(u8, index: o) }
1541   public var i16: Int16 { let o = _accessor.offset(VTOFFSET.i16.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int16.self, at: o) }
mutatenull1542   @discardableResult public func mutate(i16: Int16) -> Bool {let o = _accessor.offset(VTOFFSET.i16.v);  return _accessor.mutate(i16, index: o) }
1543   public var u16: UInt16 { let o = _accessor.offset(VTOFFSET.u16.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt16.self, at: o) }
mutatenull1544   @discardableResult public func mutate(u16: UInt16) -> Bool {let o = _accessor.offset(VTOFFSET.u16.v);  return _accessor.mutate(u16, index: o) }
1545   public var i32: Int32 { let o = _accessor.offset(VTOFFSET.i32.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int32.self, at: o) }
mutatenull1546   @discardableResult public func mutate(i32: Int32) -> Bool {let o = _accessor.offset(VTOFFSET.i32.v);  return _accessor.mutate(i32, index: o) }
1547   public var u32: UInt32 { let o = _accessor.offset(VTOFFSET.u32.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt32.self, at: o) }
mutatenull1548   @discardableResult public func mutate(u32: UInt32) -> Bool {let o = _accessor.offset(VTOFFSET.u32.v);  return _accessor.mutate(u32, index: o) }
1549   public var i64: Int64 { let o = _accessor.offset(VTOFFSET.i64.v); return o == 0 ? 0 : _accessor.readBuffer(of: Int64.self, at: o) }
mutatenull1550   @discardableResult public func mutate(i64: Int64) -> Bool {let o = _accessor.offset(VTOFFSET.i64.v);  return _accessor.mutate(i64, index: o) }
1551   public var u64: UInt64 { let o = _accessor.offset(VTOFFSET.u64.v); return o == 0 ? 0 : _accessor.readBuffer(of: UInt64.self, at: o) }
mutatenull1552   @discardableResult public func mutate(u64: UInt64) -> Bool {let o = _accessor.offset(VTOFFSET.u64.v);  return _accessor.mutate(u64, index: o) }
1553   public var f32: Float32 { let o = _accessor.offset(VTOFFSET.f32.v); return o == 0 ? 0.0 : _accessor.readBuffer(of: Float32.self, at: o) }
mutatenull1554   @discardableResult public func mutate(f32: Float32) -> Bool {let o = _accessor.offset(VTOFFSET.f32.v);  return _accessor.mutate(f32, index: o) }
1555   public var f64: Double { let o = _accessor.offset(VTOFFSET.f64.v); return o == 0 ? 0.0 : _accessor.readBuffer(of: Double.self, at: o) }
mutatenull1556   @discardableResult public func mutate(f64: Double) -> Bool {let o = _accessor.offset(VTOFFSET.f64.v);  return _accessor.mutate(f64, index: o) }
1557   public var v8Count: Int32 { let o = _accessor.offset(VTOFFSET.v8.v); return o == 0 ? 0 : _accessor.vector(count: o) }
v8null1558   public func v8(at index: Int32) -> Int8 { let o = _accessor.offset(VTOFFSET.v8.v); return o == 0 ? 0 : _accessor.directRead(of: Int8.self, offset: _accessor.vector(at: o) + index * 1) }
1559   public var v8: [Int8] { return _accessor.getVector(at: VTOFFSET.v8.v) ?? [] }
mutatenull1560   public func mutate(v8: Int8, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.v8.v); return _accessor.directMutate(v8, index: _accessor.vector(at: o) + index * 1) }
1561   public var vf64Count: Int32 { let o = _accessor.offset(VTOFFSET.vf64.v); return o == 0 ? 0 : _accessor.vector(count: o) }
vf64null1562   public func vf64(at index: Int32) -> Double { let o = _accessor.offset(VTOFFSET.vf64.v); return o == 0 ? 0 : _accessor.directRead(of: Double.self, offset: _accessor.vector(at: o) + index * 8) }
1563   public var vf64: [Double] { return _accessor.getVector(at: VTOFFSET.vf64.v) ?? [] }
mutatenull1564   public func mutate(vf64: Double, at index: Int32) -> Bool { let o = _accessor.offset(VTOFFSET.vf64.v); return _accessor.directMutate(vf64, index: _accessor.vector(at: o) + index * 8) }
startTypeAliasesnull1565   public static func startTypeAliases(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 12) }
addnull1566   public static func add(i8: Int8, _ fbb: inout FlatBufferBuilder) { fbb.add(element: i8, def: 0, at: VTOFFSET.i8.p) }
addnull1567   public static func add(u8: UInt8, _ fbb: inout FlatBufferBuilder) { fbb.add(element: u8, def: 0, at: VTOFFSET.u8.p) }
addnull1568   public static func add(i16: Int16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: i16, def: 0, at: VTOFFSET.i16.p) }
addnull1569   public static func add(u16: UInt16, _ fbb: inout FlatBufferBuilder) { fbb.add(element: u16, def: 0, at: VTOFFSET.u16.p) }
addnull1570   public static func add(i32: Int32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: i32, def: 0, at: VTOFFSET.i32.p) }
addnull1571   public static func add(u32: UInt32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: u32, def: 0, at: VTOFFSET.u32.p) }
addnull1572   public static func add(i64: Int64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: i64, def: 0, at: VTOFFSET.i64.p) }
addnull1573   public static func add(u64: UInt64, _ fbb: inout FlatBufferBuilder) { fbb.add(element: u64, def: 0, at: VTOFFSET.u64.p) }
addnull1574   public static func add(f32: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: f32, def: 0.0, at: VTOFFSET.f32.p) }
addnull1575   public static func add(f64: Double, _ fbb: inout FlatBufferBuilder) { fbb.add(element: f64, def: 0.0, at: VTOFFSET.f64.p) }
addVectorOfnull1576   public static func addVectorOf(v8: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: v8, at: VTOFFSET.v8.p) }
addVectorOfnull1577   public static func addVectorOf(vf64: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: vf64, at: VTOFFSET.vf64.p) }
endTypeAliasesnull1578   public static func endTypeAliases(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
1579   public static func createTypeAliases(
1580     _ fbb: inout FlatBufferBuilder,
1581     i8: Int8 = 0,
1582     u8: UInt8 = 0,
1583     i16: Int16 = 0,
1584     u16: UInt16 = 0,
1585     i32: Int32 = 0,
1586     u32: UInt32 = 0,
1587     i64: Int64 = 0,
1588     u64: UInt64 = 0,
1589     f32: Float32 = 0.0,
1590     f64: Double = 0.0,
1591     v8VectorOffset v8: Offset = Offset(),
1592     vf64VectorOffset vf64: Offset = Offset()
1593   ) -> Offset {
1594     let __start = MyGame_Example_TypeAliases.startTypeAliases(&fbb)
1595     MyGame_Example_TypeAliases.add(i8: i8, &fbb)
1596     MyGame_Example_TypeAliases.add(u8: u8, &fbb)
1597     MyGame_Example_TypeAliases.add(i16: i16, &fbb)
1598     MyGame_Example_TypeAliases.add(u16: u16, &fbb)
1599     MyGame_Example_TypeAliases.add(i32: i32, &fbb)
1600     MyGame_Example_TypeAliases.add(u32: u32, &fbb)
1601     MyGame_Example_TypeAliases.add(i64: i64, &fbb)
1602     MyGame_Example_TypeAliases.add(u64: u64, &fbb)
1603     MyGame_Example_TypeAliases.add(f32: f32, &fbb)
1604     MyGame_Example_TypeAliases.add(f64: f64, &fbb)
1605     MyGame_Example_TypeAliases.addVectorOf(v8: v8, &fbb)
1606     MyGame_Example_TypeAliases.addVectorOf(vf64: vf64, &fbb)
1607     return MyGame_Example_TypeAliases.endTypeAliases(&fbb, start: __start)
1608   }
1609 
1610 
unpacknull1611   public mutating func unpack() -> MyGame_Example_TypeAliasesT {
1612     return MyGame_Example_TypeAliasesT(&self)
1613   }
packnull1614   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_TypeAliasesT?) -> Offset {
1615     guard var obj = obj else { return Offset() }
1616     return pack(&builder, obj: &obj)
1617   }
1618 
packnull1619   public static func pack(_ builder: inout FlatBufferBuilder, obj: inout MyGame_Example_TypeAliasesT) -> Offset {
1620     let __v8 = builder.createVector(obj.v8)
1621     let __vf64 = builder.createVector(obj.vf64)
1622     let __root = MyGame_Example_TypeAliases.startTypeAliases(&builder)
1623     MyGame_Example_TypeAliases.add(i8: obj.i8, &builder)
1624     MyGame_Example_TypeAliases.add(u8: obj.u8, &builder)
1625     MyGame_Example_TypeAliases.add(i16: obj.i16, &builder)
1626     MyGame_Example_TypeAliases.add(u16: obj.u16, &builder)
1627     MyGame_Example_TypeAliases.add(i32: obj.i32, &builder)
1628     MyGame_Example_TypeAliases.add(u32: obj.u32, &builder)
1629     MyGame_Example_TypeAliases.add(i64: obj.i64, &builder)
1630     MyGame_Example_TypeAliases.add(u64: obj.u64, &builder)
1631     MyGame_Example_TypeAliases.add(f32: obj.f32, &builder)
1632     MyGame_Example_TypeAliases.add(f64: obj.f64, &builder)
1633     MyGame_Example_TypeAliases.addVectorOf(v8: __v8, &builder)
1634     MyGame_Example_TypeAliases.addVectorOf(vf64: __vf64, &builder)
1635     return MyGame_Example_TypeAliases.endTypeAliases(&builder, start: __root)
1636   }
1637 }
1638 
1639 public class MyGame_Example_TypeAliasesT: NativeObject {
1640 
1641   public var i8: Int8
1642   public var u8: UInt8
1643   public var i16: Int16
1644   public var u16: UInt16
1645   public var i32: Int32
1646   public var u32: UInt32
1647   public var i64: Int64
1648   public var u64: UInt64
1649   public var f32: Float32
1650   public var f64: Double
1651   public var v8: [Int8]
1652   public var vf64: [Double]
1653 
1654   public init(_ _t: inout MyGame_Example_TypeAliases) {
1655     i8 = _t.i8
1656     u8 = _t.u8
1657     i16 = _t.i16
1658     u16 = _t.u16
1659     i32 = _t.i32
1660     u32 = _t.u32
1661     i64 = _t.i64
1662     u64 = _t.u64
1663     f32 = _t.f32
1664     f64 = _t.f64
1665     v8 = []
1666     for index in 0..<_t.v8Count {
1667         v8.append(_t.v8(at: index))
1668     }
1669     vf64 = []
1670     for index in 0..<_t.vf64Count {
1671         vf64.append(_t.vf64(at: index))
1672     }
1673   }
1674 
1675   public init() {
1676     i8 = 0
1677     u8 = 0
1678     i16 = 0
1679     u16 = 0
1680     i32 = 0
1681     u32 = 0
1682     i64 = 0
1683     u64 = 0
1684     f32 = 0.0
1685     f64 = 0.0
1686     v8 = []
1687     vf64 = []
1688   }
1689 
serializenull1690   public func serialize() -> ByteBuffer { return serialize(type: MyGame_Example_TypeAliases.self) }
1691 
1692 }
1693