namespace MyGame.Example.NestedUnion; /// Composite components of Monster color. enum Color:ubyte (bit_flags) { Red = 0, // color Red = (1u << 0) /// \brief color Green /// Green is bit_flag with value (1u << 1) Green, /// \brief color Blue (1u << 3) Blue = 3, } table TestSimpleTableWithEnum (csharp_partial, private) { color: Color = Green; } struct Test { a:short; b:byte; } table Vec3 { x:double; y:double; z:double; test1:double; test2:Color; test3:Test; } union Any { Vec3, TestSimpleTableWithEnum } table NestedUnionTest { name:string; data:Any; id:short; } root_type NestedUnionTest;