Add MrGameEng.Inspector: in-engine ECS debugger overlay
CI / build-test (push) Successful in 1m14s

Introduce a Chrome-DevTools-style ECS inspector in the UI library. The
headless core (ComponentReflector + EcsInspector) enumerates the store's
entities grouped by archetype, reflects a selected entity's components and
fields, and writes simple scalar edits (number/bool/enum) back through a
generic AddComponent — all unit-tested without a GPU. The Myra overlay
(EcsInspectorUi + InspectorSystems) adds a side panel with an
archetypes -> entities -> fields tree, an editable field view, a
world-pick mode with a selection highlight, and a renderer performance
tab; wired via scene.UseInspector(renderer), toggled with F1.

The UI library now references Graphics (for picking, renderer timings and
Transform2D/Sprite). Docs updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-06-12 12:45:50 +03:00
co-authored by Claude Opus 4.8
parent f791ee6c95
commit 09dbdfad79
9 changed files with 1285 additions and 6 deletions
+6 -3
View File
@@ -52,10 +52,13 @@ Engine libraries (each feature is a namespaced subfolder of its host):
**Collisions** (`MrGameEng.Collisions`: `Collider` component, spatial hash rebuilt per
tick, pairs/queries/raycast, `scene.UseCollisions()` after movement systems).
`Core`, `Graphics` (Collisions needs `Transform2D`, `RectF`).
- **`UI`** — Myra integration (`scene.UseUI()` after `UseRenderer2D()`) plus
- **`UI`** — Myra integration (`scene.UseUI()` after `UseRenderer2D()`),
**DevConsole** (`MrGameEng.DevConsole`: in-game console capturing `Core.Log`,
`scene.UseDevConsole()` last in OnLoad). → `Core` (Myra renders with its own
SpriteBatch internally).
`scene.UseDevConsole()` last in OnLoad) and **Inspector** (`MrGameEng.Inspector`: a
Chrome-DevTools-style ECS debugger overlay — entity tree by archetype, component/field
view with simple-field editing, world-pick with selection highlight, renderer perf tab;
`scene.UseInspector(renderer)`, toggle F1). → `Core`, `Graphics` (the inspector picks
entities and reads renderer timings; Myra renders with its own SpriteBatch internally).
- **`Assets.Generator`** — Roslyn source generator for typed asset handles; standalone
netstandard2.0 analyzer.