-
Notifications
You must be signed in to change notification settings - Fork 71
Add standalone bevy_entity_inspector and bevy_transform widget for drawing on the UI #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…pressing "space" key
I couldn't get down to the exact issue, but server code gets stuck on this line: I think the issue may be caused by running sync requests in systems, effectively blocking the executor, so first step forward would be to rewrite it as async. |
…s requests and improve logging
…plement a polling mechanism. Also will update the "Component Viewer" UI with the latest entity data based on the currently selected entity as well!
This comment was marked as outdated.
This comment was marked as outdated.
…ty_inspector (using original bevy_component_viewer functionality). idea is to make this modular, so that it can be used for any bevy app
…o deserialize in the UI
…nd Component Grouping - Introduced an event-driven architecture replacing hash-based change detection with granular `InspectorEvent` system. - Organized components by crate name in the tree UI for better clarity. - Implemented a visual styling system with distinct colors for entities, crate groups, components, and fields. - Enhanced UI organization to resemble professional ECS inspectors like Flecs. - Improved change tracking efficiency by separately tracking added, removed, and updated entities. - Updated `EntityInspectorRow` to include a `data_hash` field for change detection. - Simplified component names to "crate::Type" format for remote inspection. - Added comprehensive documentation for all public APIs and performance notes. - Fixed runtime panic issues and improved memory efficiency. - Created a theme configuration for the inspector with dark and light themes. - Developed disclosure triangle UI components for collapsible tree nodes. - Implemented a tree view UI for displaying hierarchical data with selection and expansion features. - Added inspector panel and field widgets with customizable properties. - Established integration tests for the inspector plugin functionality.
…toring the Bevy entity inspector
- Implemented a property panel example for displaying entity components. - Created event system for entity inspector updates, including entity and component events. - Developed reflection utilities for extracting and formatting component data. - Built tree structures for the inspector UI, grouping components by crate. - Designed a property panel UI for displaying detailed component information. - Established UI management systems for handling inspector events and tree updates. - Added camera setup for inspector rendering. - Implemented tree node selection handling to update the property panel.
/// These events are typically emitted by data source plugins (like the remote inspection plugin) | ||
/// and consumed by the main event handler to update the tree UI. | ||
#[derive(Event, BufferedEvent, Debug, Clone)] | ||
pub enum InspectorEvent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment here about why this is an enum, rather than multiple distinct events would be useful. I think it will probably make serde a bit nicer, and it's more discoverable, and they all fit together because they force a rebuild but I was initially quite confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, totally agree - I've gone back and added much more in-depth documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! I still need to try this out hands-on. I would prefer if the two tools were split into distinct PRs, but I won't block on it.
I've left a few suggestions, but nothing blocking at this stage. Overall quality is good: this is something I'm comfortable refining.
Co-authored-by: Alice Cecile <[email protected]>
Nice! Thank you for the review. There's definitely some UX improvements we need to refine, and also there is some flickering happening every time we get the latest updates from BRP. I'll collate a list of refinements we should make as well as separate issues I've also removed the |
…/bevy_editor_prototypes into investigate-brp-usage
…ted links and detailed descriptions
style: Clean up whitespace in remote.rs for consistency
…/bevy_editor_prototypes into investigate-brp-usage
…on and UI systems
Add Entity Inspector with Component Grouping and Event-Driven Updates
Objective
Bevy currently lacks a comprehensive, user-friendly entity inspector for runtime debugging and development. Developers need a way to:
The
bevy_entity_inspector
crate provides a first-party entity inspector with modern UX patterns, designed specifically for Bevy's component model and reflection system.Solution
Component Grouping by Crate
Components are automatically organized by their crate origin for better comprehension:
Property Panel Features
When you select a component (e.g.,
Transform
), the property panel immediately displays:Visual Design System
Remote Inspection Support
bevy_remote
integration: Connect to any Bevy app with remote plugin enabledReflect
andReflectDeserialize
Testing
Basic Inspector Example
# Run basic inspector (empty until data source configured) cargo run --example inspector -p bevy_entity_inspector
Remote Inspection Testing
More Verifcation and Testing
Component Coverage Verified:
Transform
,GlobalTransform
,TransformTreeChanged
Mesh3d
,MeshMaterial3d
,RenderEntity
,SyncToRenderWorld
DirectionalLight
,PointLight
,SpotLight
,ShadowSettings
Camera
,Camera3d
,CameraRenderGraph
,Projection
Visibility
,ViewVisibility
,InheritedVisibility
Performance Testing:
UI/UX Validation:
Showcase
With reflectable fields:

Just entity data:

No reflectable fields on the selected component:
