{"id":13794559,"url":"https://github.com/jakobhellermann/bevy-inspector-egui","last_synced_at":"2025-05-12T13:16:50.323Z","repository":{"id":36979347,"uuid":"330603763","full_name":"jakobhellermann/bevy-inspector-egui","owner":"jakobhellermann","description":"Inspector plugin for the bevy game engine","archived":false,"fork":false,"pushed_at":"2025-04-25T18:31:28.000Z","size":14718,"stargazers_count":1360,"open_issues_count":31,"forks_count":197,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-12T13:16:38.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jakobhellermann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-18T08:39:24.000Z","updated_at":"2025-05-12T08:38:22.000Z","dependencies_parsed_at":"2024-01-07T06:22:14.262Z","dependency_job_id":"0d2dda78-8697-4e58-851e-1923d9f165f7","html_url":"https://github.com/jakobhellermann/bevy-inspector-egui","commit_stats":{"total_commits":674,"total_committers":32,"mean_commits":21.0625,"dds":"0.12462908011869434","last_synced_commit":"71d248f8917e2cc1fdc4ece72031164300dd2f37"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Fbevy-inspector-egui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Fbevy-inspector-egui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Fbevy-inspector-egui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakobhellermann%2Fbevy-inspector-egui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakobhellermann","download_url":"https://codeload.github.com/jakobhellermann/bevy-inspector-egui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745196,"owners_count":21957319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T23:00:43.288Z","updated_at":"2025-05-12T13:16:50.308Z","avatar_url":"https://github.com/jakobhellermann.png","language":"Rust","funding_links":[],"categories":["Rust","Dev tools","Bevy Engine","Plugins and Crates"],"sub_categories":["Ecosystem","Development tools"],"readme":"# bevy-inspector-egui\n\nExamples can be found at [`./crates/bevy-inspector-egui/examples`](./crates/bevy-inspector-egui/examples/).\n\nThis crate contains\n\n- general purpose machinery for displaying [`Reflect`](bevy_reflect::Reflect) values in [reflect_inspector],\n- a way of associating arbitrary options with fields and enum variants in [inspector_options]\n- utility functions for displaying bevy resource, entities and assets in [bevy_inspector]\n- some drop-in plugins in [quick] to get you started without any code necessary.\n\nThe changelog can be found at [`docs/CHANGELOG.md`](./docs/CHANGELOG.md).\n\n# Use case 1: Quick plugins\n\nThese plugins can be easily added to your app, but don't allow for customization of the presentation and content.\n\n## WorldInspectorPlugin\n\nDisplays the world's entities, resources and assets.\n\n![image of the world inspector](https://raw.githubusercontent.com/jakobhellermann/bevy-inspector-egui/main/docs/images/world_inspector.png)\n\n```rust\nuse bevy::prelude::*;\nuse bevy_inspector_egui::quick::WorldInspectorPlugin;\n\nfn main() {\n    App::new()\n        .add_plugins(DefaultPlugins)\n        .add_plugins(EguiPlugin { enable_multipass_for_primary_context: true })\n        .add_plugins(WorldInspectorPlugin::new())\n        .run();\n}\n```\n\n## ResourceInspectorPlugin\n\nDisplay a single resource in a window.\n\n![image of the resource inspector](https://raw.githubusercontent.com/jakobhellermann/bevy-inspector-egui/main/docs/images/resource_inspector.png)\n\n```rust\nuse bevy::prelude::*;\nuse bevy_inspector_egui::prelude::*;\nuse bevy_inspector_egui::quick::ResourceInspectorPlugin;\n\n// `InspectorOptions` are completely optional\n#[derive(Reflect, Resource, Default, InspectorOptions)]\n#[reflect(Resource, InspectorOptions)]\nstruct Configuration {\n    name: String,\n    #[inspector(min = 0.0, max = 1.0)]\n    option: f32,\n}\n\nfn main() {\n    App::new()\n        .add_plugins(DefaultPlugins)\n        .init_resource::\u003cConfiguration\u003e() // `ResourceInspectorPlugin` won't initialize the resource\n        .register_type::\u003cConfiguration\u003e() // you need to register your type to display it\n        .add_plugins(EguiPlugin { enable_multipass_for_primary_context: true })\n        .add_plugins(ResourceInspectorPlugin::\u003cConfiguration\u003e::default())\n        // also works with built-in resources, as long as they are `Reflect`\n        .add_plugins(ResourceInspectorPlugin::\u003cTime\u003e::default())\n        .run();\n}\n```\n\n\u003chr\u003e\n\nThere is also the [`StateInspectorPlugin`](quick::StateInspectorPlugin) and the [`AssetInspectorPlugin`](quick::AssetInspectorPlugin).\n\n# Use case 2: Manual UI\n\nThe [quick] plugins don't allow customization of the egui window or its content, but you can easily build your own UI:\n\n```rust\nuse bevy::prelude::*;\nuse bevy_egui::EguiPlugin;\nuse bevy_inspector_egui::prelude::*;\nuse std::any::TypeId;\n\nfn main() {\n    App::new()\n        .add_plugins(DefaultPlugins)\n        .add_plugins(EguiPlugin { enable_multipass_for_primary_context: true })\n        .add_plugins(bevy_inspector_egui::DefaultInspectorConfigPlugin) // adds default options and `InspectorEguiImpl`s\n        .add_systems(EguiContextPass, inspector_ui)\n        .run();\n}\n\nfn inspector_ui(world: \u0026mut World) {\n    let Ok(egui_context) = world\n        .query_filtered::\u003c\u0026mut EguiContext, With\u003cPrimaryWindow\u003e\u003e()\n        .get_single(world)\n    else {\n        return;\n    };\n    let mut egui_context = egui_context.clone();\n\n    egui::Window::new(\"UI\").show(egui_context.get_mut(), |ui| {\n        egui::ScrollArea::vertical().show(ui, |ui| {\n            // equivalent to `WorldInspectorPlugin`\n            bevy_inspector_egui::bevy_inspector::ui_for_world(world, ui);\n\n            egui::CollapsingHeader::new(\"Materials\").show(ui, |ui| {\n                bevy_inspector_egui::bevy_inspector::ui_for_assets::\u003cStandardMaterial\u003e(world, ui);\n            });\n\n            ui.heading(\"Entities\");\n            bevy_inspector_egui::bevy_inspector::ui_for_world_entities(world, ui);\n        });\n    });\n}\n```\n\nPair this with a crate like [`egui_dock`](https://docs.rs/egui_dock/latest/egui_dock/) and you have your own editor in less than 100 lines: [`examples/egui_dock.rs`](https://github.com/jakobhellermann/bevy-inspector-egui/blob/main/crates/bevy-inspector-egui/examples/integrations/egui_dock.rs).\n![image of the egui_dock example](https://raw.githubusercontent.com/jakobhellermann/bevy-inspector-egui/main/docs/images/egui_dock.png)\n\n## Cargo features\n\n- `highlight_changes` - highlight changed values every frame.\n  Ideally this should be runtime-configurable, but it was implemented like this as a stopgap solution. If you'd like to configure this at runtime, please open an issue to let me know it's more of a priority.\n- `bevy_pbr` (default): register default options for `bevy_pbr` types. You should disable this if you don't use `bevy_pbr` to reduce the dependency footprint.\n\n## FAQ\n\n**Q: How do I change the names of the entities in the world inspector?**\n\n**A:** You can insert the [`Name`](https://docs.rs/bevy_core/latest/bevy_core/struct.Name.html) component.\n\n**Q: What if I just want to display a single value without passing in the whole `\u0026mut World`?**\n\n**A:** You can use `reflect_inspector::ui_for_value`. Note that displaying things like `Handle\u003cStandardMaterial\u003e` won't be able to display the asset's value.\n\n**Q:** Can I change how exactly my type is displayed?\n\n**A:** Implement `InspectorPrimitive` and call `app.register_type_data::\u003cT, InspectorEguiImpl\u003e`.\n\n[reflect_inspector]: https://docs.rs/bevy-inspector-egui/latest/bevy_inspector_egui/reflect_inspector\n[inspector_options]: https://docs.rs/bevy-inspector-egui/latest/bevy_inspector_egui/inspector_options\n[quick]: https://docs.rs/bevy-inspector-egui/latest/bevy_inspector_egui/quick\n[bevy_inspector]: https://docs.rs/bevy-inspector-egui/latest/bevy_inspector_egui/bevy_inspector\n\n## Bevy support table\n\n| bevy | bevy-inspector-egui |\n| ---- | ------------------- |\n| 0.16 | 0.31                |\n| 0.15 | 0.30                |\n| 0.15 | 0.29                |\n| 0.15 | 0.28                |\n| 0.14 | 0.27                |\n| 0.14 | 0.26                |\n| 0.14 | 0.25                |\n| 0.13 | 0.24                |\n| 0.13 | 0.23                |\n| 0.12 | 0.22                |\n| 0.12 | 0.21                |\n| 0.11 | 0.19-0.20           |\n| 0.10 | 0.18                |\n| 0.9  | 0.14-0.17           |\n| 0.8  | 0.12-0.13           |\n| 0.7  | 0.10-0.11           |\n| 0.6  | 0.9                 |\n| 0.6  | 0.8                 |\n| 0.6  | 0.7                 |\n| 0.5  | 0.5-0.6             |\n| 0.5  | 0.4                 |\n| 0.4  | 0.1-0.3             |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakobhellermann%2Fbevy-inspector-egui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakobhellermann%2Fbevy-inspector-egui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakobhellermann%2Fbevy-inspector-egui/lists"}