Inno.Editor.Inspection
Section titled “Inno.Editor.Inspection”
- Generation-scoped target/property/attribute drawers and feature-owned reversible mutation, independent of Inspector Panel.
Generation-scoped target/property/attribute drawers and feature-owned reversible mutation, independent of Inspector Panel.
Reuse common inspection
Section titled “Reuse common inspection”Add an Inspector drawer explains deterministic discovery, conditional ambiguity, one-snapshot name binding, shared property rendering, inline isolation and neutral text state. A feature references Inspection and injects only its domain services, without depending on another panel.
Preserve mutation and lifetime contracts
Section titled “Preserve mutation and lifetime contracts”PropertyDrawContext.SetValue routes to the feature’s edit service. Drawers do not mutate serialized owners behind History. Shared annotations affect presentation, not persistence or schema. Linear color semantics, precise editing/range constraints and readonly behavior remain consistent across default/custom/inline controls.
Each renderer owns text state through weak owners, full property paths and local keys; only strings are retained. Candidate registry failure preserves the previous valid snapshot. Feature icon providers share policy without panel-to-panel references. Editor scripts receive selected drawer and property-edit contracts, not activators, registry snapshots or concrete scene mutation adapters.
Host examples
Section titled “Host examples”These use the actual host contracts and borrowed live dependencies. They do not initialize a product or establish lifecycle/device acceptance.
using System;using Inno.Assets;using Inno.Editor.Inspection;
[InspectionDrawer(typeof(TextAsset), priority: 100)]public sealed class TextAssetDrawer : InspectionDrawer<TextAsset>{ public override string icon => "T";
protected override (string name, Action<string>? setter) BindName( InspectionDrawContext context, TextAsset target ) => (target.name, null);
protected override void Draw( InspectionDrawContext context, TextAsset target ) { context.DrawProperties(); }}using Inno.Editor.Inspection;using Inno.Editor.ImGui;using Inno.Editor.ImGui.ImGuiWidget;
public readonly record struct AuthoringWeight(float value);
[PropertyDrawer(typeof(AuthoringWeight), priority: 100)]public sealed class AuthoringWeightDrawer : IPropertyDrawer{ public void Draw(PropertyDrawContext context) { float value = context.GetValue() is AuthoringWeight current ? current.value : 0f; if (EditorUiSession.current.widgets.CompactSliderFloat($"##{context.path}", ref value, 0f, 1f)) context.SetValue(new AuthoringWeight(value)); }}Script examples
Section titled “Script examples”Source boundary
Section titled “Source boundary”Source project. Declarations, script selection and runtime behavior require separate matching evidence.
API reference
Section titled “API reference”Types and exact member contracts preserve captured declarations and source XML.
Logical script references
Section titled “Logical script references”The compiler-selected script declarations are separate from this project’s host CLR surface. Read the script calling guide and the associated module contracts before using a projected member.
Source project facts
Section titled “Source project facts”Project: Inno.Editor.Inspection
Source: src/composition/editor/framework/Inno.Editor.Inspection/Inno.Editor.Inspection.csproj
| Type | API | Description |
|---|---|---|
| IInspectionDrawer | engine | Defines the runtime bridge used to render a discovered inspection drawer. |
| IInspectionIconProvider<TTarget> | engine | Resolves a presentation icon for inspected targets owned by another editor feature. |
| IInspectionPropertyEditService | engine | Applies one root serialized-property mutation through the history mechanism owned by a feature. |
| IInspectorAttributeDrawer | engine | Extends serialized-property presentation with reusable attribute-driven behavior. |
| IPropertyDrawer | engine | Draws and optionally edits one serialized property value. |
| InspectionDrawContext | engine | Provides services and state to an inspector drawer. |
| InspectionDrawerAttribute | engine | Associates an inspector drawer with a selected target type. |
| InspectionDrawerFactory | engine | Creates one discovered inspection drawer through the owning editor composition root. |
| InspectionDrawerRegistry | engine | Discovers and resolves inspection drawers through the active type catalog. |
| InspectionDrawer<TTarget> | engine | Provides the target-specific header presentation and body drawing behavior for an inspected target. |
| InspectorAttributeDrawContext | engine | Carries the mutable presentation state of one attribute-annotated Inspector property. |
| InspectorAttributeDrawerAttribute | engine | Associates an Inspector attribute drawer with an attribute type. |
| InspectorAttributeDrawerRegistry | engine | Discovers generation-aware Inspector attribute drawers and applies them in declaration order. |
| PropertyDrawContext | engine | Encapsulates one editable property path and its drawing services. |
| PropertyDrawerAttribute | engine | Associates a property drawer with a declared property type. |
| PropertyDrawerRegistry | engine | Discovers and resolves serialized property drawers through the active type catalog. |
| SerializedPropertyRenderer | engine | Resolves drawers and renders serialized property paths with isolated error handling. |
| IInspectionIconProvider<TTarget> | Editor | Resolves a presentation icon for inspected targets owned by another editor feature. |
| IInspectionPropertyEditService | Editor | Applies one root serialized-property mutation through the history mechanism owned by a feature. |
| IInspectorAttributeDrawer | Editor | Extends serialized-property presentation with reusable attribute-driven behavior. |
| IPropertyDrawer | Editor | Draws and optionally edits one serialized property value. |
| InspectionDrawContext | Editor | Provides services and state to an inspector drawer. |
| InspectionDrawerAttribute | Editor | Associates an inspector drawer with a selected target type. |
| InspectionDrawer<TTarget> | Editor | Provides the target-specific header presentation and body drawing behavior for an inspected target. |
| InspectorAttributeDrawContext | Editor | Carries the mutable presentation state of one attribute-annotated Inspector property. |
| InspectorAttributeDrawerAttribute | Editor | Associates an Inspector attribute drawer with an attribute type. |
| PropertyDrawContext | Editor | Encapsulates one editable property path and its drawing services. |
| PropertyDrawerAttribute | Editor | Associates a property drawer with a declared property type. |
| SerializedPropertyRenderer | Editor | Resolves drawers and renders serialized property paths with isolated error handling. |