[Reflection] Add an "Enum" entry to the TypeInfo, ReflectRef, and ReflectMut, enums #5448
nicklongdesign
started this conversation in
Ideas
Replies: 1 comment
-
See #4761, which is still part of the 0.8 milestone, so 🤞 Edit: it was removed from the 0.8 milestone (I would expect it in 0.9 then) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now if a Reflected type is an enum it is registered as a "Value" which in Bevy-reflection that means we lose almost all info about the enum (if I'm reading this correctly).
That means we lose how many entries, what their names are, and if the entries have any supplemental data associated with them. In order to address this I'd like to propose an "Enum" type to add to the TypeInfo, ReflectRef, and ReflectMut enums, that would include some way of accessing information about those enums: counts, names, and then if the subtype was a value, struct, tuple struct, etc.
Is this a good candidate for a new issue? Or am I just missing something when it comes to handling reflected enums?
Beta Was this translation helpful? Give feedback.
All reactions