public interface IEditorRegistryEverything the editor has been told about, without a record of who told it.
Remarks
Doc 36 § D2. Three producers write here — a source generator at compile time, a plugin's Activate at load time, and a project's own Editor/ scripts when a project opens — and a consumer cannot tell them apart. That is the whole property: a fourth producer is a new producer and not a new consumer, and a built-in feature that registers here is a feature proving the same door a third party comes through.
⚠ A typed multimap rather than a method per kind. Adding a contribution kind is declaring a record in the assembly that owns it, not writing a registry and a consumer and a plugin method. The alternative was tried in miniature and is what F10 reports: two registries for one idea, and a reconciliation layer over them.
⚠ It is not the only registry, and pretending otherwise would be the same mistake. Commands, panels, layouts and modes belong to EditorShell; drawers belong to DrawerRegistry; described types belong to InspectorRegistry. Each is the one place its thing is declared, and copying them here would make a plugin's drawer land in whichever of two registries the inspector was not reading. What comes here is what had no owner: the asset kinds Create ▸ offers, custom inspectors, scene-view tools, gizmos, settings pages, previews.
Adding hands back the removal. A plugin's registration scope keeps it, a test disposes it, and nothing has to name what it added a second time in order to take it out.
Events (1)
Action<Type>? ChangedRaised after any contribution of a kind is added or removed, with that kind.
Methods (2)
IReadOnlyList<T> All<T>() where T : classEverything contributed of one kind, oldest first.
IDisposable Add<T>(T contribution) where T : classAdds a contribution.
Used by (15)
- ComponentGizmosVixen.Editor.SceneView
- ComponentsViewVixen.Editor.App
- DeclaredContributionTestsVixen.Editor.App.Tests
- DeclaredContributionsVixen.Editor.App
- EditorApplicationVixen.Editor.App
- EditorRegistryVixen.Editor.Core
- EditorSessionVixen.Editor.Testing
- EditorSessionOptionsVixen.Editor.Testing
- IconContributionTestsVixen.Editor.App.Tests
- InspectorViewVixen.Editor.Inspector
- ProjectBrowserVixen.Editor.App
- SceneMenuTestsVixen.Editor.App.Tests
- SceneViewportVixen.Editor.SceneView
- TerrainModuleVixen.Editor.Terrain
- ViewportChromeVixen.Editor.App