Blacksite/docs/adr/0010-actor-kind-and-inspector.md
Rbanh f29712d158
Some checks are pending
CI / Format, lint, test, build (push) Waiting to run
Initial project import
2026-06-05 21:44:45 -04:00

23 lines
1.1 KiB
Markdown

# ADR 0010: ActorKind and inspector architecture
## Status
Accepted
## Context
Inspector panels were routed by `if world.get::<LightDesc>` and mixed with `bevy_inspector_egui` entity dumps, which exposed runtime components and diverged from saved scenes.
## Decision
- Every savable `LevelObject` carries a required **`ActorKind`** component (schema v2).
- One-shot **`ActorKind` backfill** runs in `crates/scene` migration v1→v2; load-time backfill is a fallback only for unsaved in-memory entities.
- **`validate_actor`** runs on save and rejects invalid component sets per kind.
- The default **Inspector** tab uses **`actor_inspector`** only (transform first, then authoring panels). No `ui_for_entity_with_children` in production builds.
## Consequences
- Spawn/history snapshots always include `actor_kind`.
- `DefaultInspectorConfigPlugin` is not registered in the editor app; `bevy-inspector-egui` remains only for `SelectedEntities` until selection is decoupled.
- Optional `inspector-debug` feature may add a separate engine ECS tab later—not a second inspector on the same tab.