Skip to content

Add entity and resource inspection to bevy_dev_tools - #25845

Merged
alice-i-cecile merged 1 commit into
bevyengine:mainfrom
jbuehler23:jackdaw/inspector-entity-types
Sep 20, 2026
Merged

alice-i-cecile merged 1 commit into
bevyengine:mainfrom
jbuehler23:jackdaw/inspector-entity-types

Conversation

@jbuehler23

Copy link
Copy Markdown
Contributor

Objective

Part of #23013.

Add entity and resource inspection to the inspection module, on top of the component inspection that landed in #25823. This is what the inspector UI and the remote front end will consume.

Ported from feathers_inspector, phase 4.2 of the upstreaming strategy there. Related to #25007 and #25818.

Solution

  • an entity inspection carrying the resolved label, spawn details, the component inspections and the total memory size, with a display impl
  • a resource inspection carrying the name, value string, type id, memory size and type registration
  • settings and error types for each
  • extension trait methods on the world for inspect, inspect with a cached metadata map, inspect resource by type or id, and inspect all resources
  • command helpers that log the result

A few small differences from feathers_inspector. Resource entities get labelled with the resource's short name. Memory size is just the sum of the component sizes. Missing entities return an error instead of panicking, and spawn details are only filled in when they're available.

AI disclosure

AI assistance was used to help port these changes and to plan this upstream series from our existing Jackdaw functionality. All changes were reviewed by a human before submission.

@jbuehler23
jbuehler23 force-pushed the jackdaw/inspector-entity-types branch from aed6a86 to 161a40d Compare September 19, 2026 06:20
@jbuehler23 jbuehler23 added C-Feature A new feature, making something new possible A-Dev-Tools Tools used to debug Bevy applications. D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 19, 2026
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 20, 2026
@alice-i-cecile

Copy link
Copy Markdown
Member

Thanks for the small improvements :D

@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Sep 20, 2026
@jbuehler23
jbuehler23 force-pushed the jackdaw/inspector-entity-types branch from 161a40d to 42e73a1 Compare September 20, 2026 21:41
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 20, 2026
Merged via the queue into bevyengine:main with commit 68f21a3 Sep 20, 2026
38 checks passed
gregcsokas pushed a commit to gregcsokas/bevy that referenced this pull request Sep 21, 2026
# Objective

Part of bevyengine#23013.

Add entity and resource inspection to the inspection module, on top of
the component inspection that landed in bevyengine#25823. This is what the
inspector UI and the remote front end will consume.

Ported from feathers_inspector, phase 4.2 of the upstreaming strategy
there. Related to bevyengine#25007 and bevyengine#25818.

# Solution

- an entity inspection carrying the resolved label, spawn details, the
component inspections and the total memory size, with a display impl
- a resource inspection carrying the name, value string, type id, memory
size and type registration
- settings and error types for each
- extension trait methods on the world for inspect, inspect with a
cached metadata map, inspect resource by type or id, and inspect all
resources
- command helpers that log the result

A few small differences from feathers_inspector. Resource entities get
labelled with the resource's short name. Memory size is just the sum of
the component sizes. Missing entities return an error instead of
panicking, and spawn details are only filled in when they're available.

# AI disclosure

AI assistance was used to help port these changes and to plan this
upstream series from our existing Jackdaw functionality. All changes
were reviewed by a human before submission.
mockersf pushed a commit to mockersf/bevy that referenced this pull request Sep 24, 2026
# Objective

Part of bevyengine#23013.

The inspection types can be built and displayed but not sent anywhere.
Remote tooling needs them as JSON, and an editing client needs the
actual field values, not just a display string.

Ported from feathers_inspector, phase 4.3 of the upstreaming strategy
there. Builds on bevyengine#25823 and bevyengine#25845.

# Solution

Serde support for the inspection types behind the `serialize` feature,
plus structured values.

- `with` helpers for component id, archetype id, debug name, storage
type, the metadata map and spawn details
- serde derives on the inspection and metadata types, with reflected
values and type registrations skipped
- a `serialized_value` on component and resource inspections, filled
through the typed reflect serializer when the new
`include_serialized_value` setting is on
- the feature now pulls in `serde_json` and the ecs, platform and utils
serialize features

The two error types with a static string variant are serialize only.
Spawn details serialize as tick and location and deserialize to none.

# AI disclosure

AI assistance was used to help port these changes and to plan this
upstream series from our existing Jackdaw functionality. All changes
were reviewed by a human before submission.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dev-Tools Tools used to debug Bevy applications. C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants