Blacksite/docs/adr/0010-actor-kind-and-inspector.md
Rbanh 0798aa5d57 Build renderer and material component foundations
Add dedicated skinned rendering, pose restoration, shared Material and Material Instance slots, registry-driven components, Surface/Solari integration, transactional schema upgrades, navigation authoring, documentation, and evaluation evidence.
2026-07-12 00:24:06 -04:00

1.3 KiB

ADR 0010: ActorKind and inspector architecture

Status

Partially superseded by ADR 0034.

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. ADR 0034 replaces this authority model with component-owned validation while retaining ActorKind as a derived compatibility/display hint.
  • 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.