bevy-inspector-egui
bevy-inspector-egui copied to clipboard
split inspector code off from egui code into new crate(s).
This project's inspector is very useful, the code behind it is also very useful. I personally use get_entity_component_reflect for displaying components for my component inspector in bevy_ui_extras.
Unfortunately, this project being bound to egui is very limiting. I'm personally hitting a wall with egui's usefulness due to immediate mode and would like to repurpose this project's inspector for an iced based inspector.
Is it possible to split this project from bevy_inspector_egui into bevy_inspector + bevy_inspector_egui, and if its doable, what would need to be done?
Definitely possible.
Which parts would you like to reuse?
- The
RestrictedWorldViewcould definitely be a standalone crate - the
InspectorOptionsderive and code is independant of bevy_egui. Do you reuse that? - All the logic in
InspectorUiI think you have to reimplement, it's too tightly coupled to egui. It's basically- recursive walking of the reflected data
- UI for lists, maps, ...
- the short circuiting logic for handling
Handle<T>asT
The InspectorOptions seem like something that would eventually be part of upstream bevy (especially with an editor) but it's good to experiment in third party crates first.
Definitely possible.
Which parts would you like to reuse?
* The `RestrictedWorldView` could definitely be a standalone crate * the `InspectorOptions` derive and code is independant of bevy_egui. Do you reuse that? * All the logic in `InspectorUi` I think you have to reimplement, it's too tightly coupled to egui. It's basically * recursive walking of the reflected data * UI for lists, maps, ... * the short circuiting logic for handling `Handle<T>` as `T`The InspectorOptions seem like something that would eventually be part of upstream bevy (especially with an editor) but it's good to experiment in third party crates first.
I don't make calls to inspector options at the moment.
I do, make calls to restricted_world_view.rs though. For get_entity_component_reflect and for ui_for_reflect_with_options from reflect_inspector.
reflect_inspector does have a lot of useful stuff in it, but looking at what I call from my crate and this crate, RestrictedWorldView seems to have very little coupling with egui other than it being in a crate that pulls it.