You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reflect non-callback components and resources in bevy_core_widgets and bevy_feathers (#20339)
# Objective
- Reflecting public components and resources is essential to allow them
to be saved to scenes and function properly in inspectors
- Fixes#20040.
## Solution
- Derive reflect for all of the public components and resources that
didn't have it
- Various components that store a `Callback`, like `CoreButton`, are a
notable exception
- Because Callbacks are not type-erased, and the reflect derive only
works when all generics are reflect, I could not get this to work nicely
- If you can get this working, please let me know and we can do this in
follow-up!
- I also slapped a missing Debug derive on the theme resource because it
seems extremely useful and I noticed it
## Notes to reviewers
- this is not feature-gated: see #20337 for the steps needed to
meaningfully do so. Fixing that is out of scope for the 0.17 release.
- I've opted to separate the Reflect derive from the other derives
wherever rustfmt would let me. While this looks dumb right now, it will
reduce the diff noise when fixing #20337.
- I could add reflection to the callback-containing components with an
ignore for the callback fields, but I don't think this is particularly
useful
0 commit comments