* docs: add graph-model.md for Quantum contributor docs * docs: add asset-graph.md for Quantum contributor docs * docs: add property-grid.md for Quantum contributor docs * docs: add README.md, completing Quantum contributor docs * chore: move contributors docs * docs: unwrap quantum markdown |
||
|---|---|---|
| .. | ||
| asset-graph.md | ||
| graph-model.md | ||
| property-grid.md | ||
| README.md | ||
Quantum — Overview
Quantum is Stride's graph-based introspection framework. It wraps any .NET object hierarchy into a typed node graph, and that graph is the single source of truth for three things: property grid display, undo/redo, and asset override tracking (the "bold = overridden" behaviour in prefab/archetype workflows).
Layers
flowchart TD
A["Stride.Core.Quantum<br/>sources/presentation/Stride.Core.Quantum/<br/>Live node graph over .NET objects"]
B["Stride.Core.Assets.Quantum<br/>sources/assets/Stride.Core.Assets.Quantum/<br/>Override tracking, base-asset linking"]
C["Stride.Core.Presentation.Quantum<br/>sources/presentation/Stride.Core.Presentation.Quantum/<br/>INodePresenter — property grid view model"]
D["Stride.Core.Assets.Editor<br/>sources/editor/Stride.Core.Assets.Editor/Quantum/<br/>IAssetNodePresenter, AssetNodePresenterUpdaterBase"]
E["Stride.Assets.Presentation<br/>sources/editor/Stride.Assets.Presentation/NodePresenters/<br/>Concrete updaters per asset type"]
A --> B
B --> C
C --> D
D --> E
Data Flow
- Asset opens —
AssetPropertyGraph(created viaAssetQuantumRegistry.ConstructPropertyGraphwith the session'sAssetPropertyGraphContainer) callsGetOrCreateNode(asset)on the underlyingNodeContainerto build the core graph. - Override semantics —
AssetPropertyGraphlinks each node to its counterpart in the base asset graph (if any) and marks inherited vs. overridden values. - Presenter tree —
AssetNodePresenterFactorywalks the node graph and creates oneIAssetNodePresenterper node. - Updaters run — all registered
INodePresenterUpdaterimplementations getUpdateNode()called per node, thenFinalizeTree()called once for the full tree. - Property grid binds — the WPF property grid binds to the presenter tree:
DisplayName→ label,Value/UpdateValue→ input control,IsVisible/IsReadOnly→ visibility and editability,AttachedProperties→ input constraints.
When You Need Quantum
Decision tree:
Adding a new asset type with default property grid display? → No Quantum code needed.
[DataMember]and[Display]attributes on the asset class are sufficient. See asset-system/README.md.Customising visibility, display names, numeric constraints, or computed properties for a new or existing asset? → Write an
INodePresenterUpdater. See property-grid.md.Asset class holds members that are references to other content objects (Prefabs, Textures)? → Write an
AssetPropertyGraphDefinition. See asset-graph.md.Custom override or inheritance behaviour (rare — scenes and prefabs already cover this)? → Subclass
AssetPropertyGraph. See asset-graph.md.
Spoke Files
| File | Covers |
|---|---|
| graph-model.md | IGraphNode, IObjectNode, IMemberNode, NodeContainer, mutations, change listeners |
| asset-graph.md | AssetPropertyGraph, override model, AssetPropertyGraphDefinition, AssetQuantumRegistry |
| property-grid.md | INodePresenter, IAssetNodePresenter, updater pipeline, INodePresenterUpdater cookbook |