-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add inspect command for debugging entities and their components #1467
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
What problem does this solve or what need does it fill?
Querying for specific components of entity is easy, but finding all of its components is necessarily hard, since it would require an exclusive system. This is particularly challenging for beginners who are attempting to understand the ECS or some specialized feature of it.
What solution would you like?
Add a
Commandthat prints / provides information about the specified entity. Component names would be the MVP, but component contents may also be worth including if a suitable debug method exists for them.What alternative(s) have you considered?
Implementing
Debugfor aWorldor aQuerycould also work well, and might be a nice complementary solution. See #1130 for this.Serializing entities into a
Scenecould also work well, but still requires good introspection capabilities and is somewhat unnatural when you only want to quickly examine the results.Additional context
This functionality would be very useful in the context of an editor: see bevy-inspector-egui for a wonderful prototype of this in a GUI context.