Module bevy_inspector_egui::bevy_inspector
source · Expand description
Methods for displaying bevy
resources, assets and entities
Example
use bevy_inspector_egui::bevy_inspector;
#[derive(Debug, Clone, Eq, PartialEq, Hash, Reflect)]
enum AppState { A, B, C }
fn show_ui(world: &mut World, ui: &mut egui::Ui) {
let mut any_reflect_value = Vec3::new(1.0, 2.0, 3.0);
bevy_inspector::ui_for_value(&mut any_reflect_value, ui, world);
ui.heading("Msaa resource");
bevy_inspector::ui_for_resource::<Msaa>(world, ui);
ui.heading("App State");
bevy_inspector::ui_for_state::<AppState>(world, ui);
egui::CollapsingHeader::new("Entities")
.default_open(true)
.show(ui, |ui| {
bevy_inspector::ui_for_world_entities(world, ui);
});
egui::CollapsingHeader::new("Resources").show(ui, |ui| {
bevy_inspector::ui_for_resources(world, ui);
});
egui::CollapsingHeader::new("Assets").show(ui, |ui| {
bevy_inspector::ui_for_all_assets(world, ui);
});
}
Modules
- UI for displaying the entity hierarchy
- Short circuiting methods for the
InspectorUi
to enable it to displayHandle
s
Functions
- Guesses an appropriate entity name like
Light (6)
or falls back toEntity (8)
- Display all reflectable assets
- Display all assets of the specified asset type
A
- Display the given entity with all its components and children
- Display the components of the given entity
- Display the given entity with all its components and children
- Display the resource
R
- Display all reflectable resources in the world
- Display state
T
and change state on edit - Display a single
&mut dyn Reflect
. - Display
Entities
,Resources
andAssets
using their respective functions inside headers - Display all entities and their components
- Display all entities matching the given filter