jakobhellermann / bevy-inspector-egui

Inspector plugin for the bevy game engine
Apache License 2.0
1.15k stars 169 forks source link

Only display some components #81

Closed johanhelsing closed 2 years ago

johanhelsing commented 2 years ago

From the readme, it sounds like it should be possible to only show specific components...

If you want to only display some components, you may want to use the InspectorQuery instead?

However, at least when using InspectorQuerySingle, it seems like the behavior is to always show all the components of the matching entities... while I want to get rid of all the extra noise and only show the components I asked for, not ComputedVisibility++

Is it supported somehow to only show specific components?

jakobhellermann commented 2 years ago

All components should only be displayed if you use InspectorQuery<Entity>. If you use InspectorQuery<&'static mut ComputedVisibility> (or any other query InspectorQuery<(Other, Query, Types), Filter> with &'static lifetimes) you should only get the ones you're interested in.

johanhelsing commented 2 years ago

Right, this totally works already :) Sorry about the noise.