public sealed class PluginServicesThe extension points that do not live in the shell, published by whoever owns them.
Remarks
Doc 11 lists eight extension points and the shell is the vocabulary for five. Commands, menu items and panels are PluginContext's directly, because Vixen.Editor.Ui is the one editor assembly this contract references. The other three — property drawers, asset importers, node types, and the gizmos and build steps that come with them — live in Vixen.Editor.Inspector, .Assets, .NodeGraph and .SceneView, and are reached through here.
⚠ Why a lookup rather than four more project references. A plugin that adds a menu item would otherwise have Vixen.Editor.Assets in its build — which carries Assimp and a model importer for two dozen authoring formats — for a contract it never calls. And a plugin that does write an importer references that assembly itself, gets the real IAssetImporter and the real ImporterRegistry, and hands the typed registry to Require``1. The weak step is one line at the top of Activate, and everything after it is as typed as it would ever have been.
⚠ One service per type. The host publishes the registries it has; a second DrawerRegistry would mean two answers to "where do drawers go" and half a plugin's drawers landing in the one the inspector does not read. Publishing a type twice throws.
Fields and properties (1)
public IReadOnlyCollection<Type> AvailableWhat has been published, in no particular order.
Methods (4)
public PluginServices Add<T>(T service) where T : classPublishes a service under its own type.
public bool Contains<T>() where T : classWhether a service is published.
public bool TryGet<T>(out T? service) where T : classThe service of a type, if the host published one.
public T Require<T>() where T : classThe service of a type, or a failure naming it.
Used by (13)
- AssetEditorsModuleVixen.Editor.AssetEditors
- BlockoutModuleVixen.Editor.Blockout
- DeclaredContributionsVixen.Editor.App
- DiagnosticsModuleVixen.Editor.Diagnostics
- EditorApplicationVixen.Editor.App
- EditorScriptTestsVixen.Editor.Scripts.Tests
- LoadingTestsVixen.Editor.Plugin.Tests
- OutOfTreePluginTestsVixen.Editor.App.Tests
- PluginContextVixen.Editor.Plugin
- PluginHostVixen.Editor.Plugin
- ScriptModuleVixen.Editor.Scripts
- ScriptsModuleVixen.Editor.Scripts
- TerrainModuleVixen.Editor.Terrain