Closed Xion closed 1 year ago
This would be fixed by adding an implementation of Inspectable
for State<T: Inspectable>
.
But since bevy 0.9 will release soon and I have been planning a rewrite of bevy-inspector-egui replacing Inspectable
with Reflect
I don't think this is worth fixing for the time being.
In the rewrite, I added a StateInspectorPlugin<T>
that can used, and there is a ui_for_state<T>
helper function which can be used as well in a custom UI function.
That sounds great! Looking forward to the rewrite. Using Reflect
rather than custom trait should definitely improve usability. Thanks!
the rewrite is now published as 0.16
This doesn't appear to be possible currently. Code similar to:
makes rustc complain about
State
not implementingInspectable
. If adding such impl doesn't work, introducing a dedicatedStateInspector
could work equally well.(Bonus point for support
iyes_loopless
states, too ;-) )