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) {
    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 display Handles

Functions

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 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 Entities, Resources and Assets using their respective functions inside headers
Display all entities and their components