1# automatically generated by the FlatBuffers compiler, do not modify 2 3# namespace: NestedUnion 4 5class Any(object): 6 NONE = 0 7 Vec3 = 1 8 TestSimpleTableWithEnum = 2 9 10def AnyCreator(unionType, table): 11 from flatbuffers.table import Table 12 if not isinstance(table, Table): 13 return None 14 if unionType == Any().Vec3: 15 import MyGame.Example.NestedUnion.Vec3 16 return MyGame.Example.NestedUnion.Vec3.Vec3T.InitFromBuf(table.Bytes, table.Pos) 17 if unionType == Any().TestSimpleTableWithEnum: 18 import MyGame.Example.NestedUnion.TestSimpleTableWithEnum 19 return MyGame.Example.NestedUnion.TestSimpleTableWithEnum.TestSimpleTableWithEnumT.InitFromBuf(table.Bytes, table.Pos) 20 return None 21