Vixen
02b45cc4
csharp
public sealed class BlockoutModule

Blockout, registering itself through the door a third-party plugin comes through.

Read the guide page for this →

Remarks

Doc 36 § F2 named this assembly twice: "Blockout is not a plugin; it is a project reference." It still is one — the editor's executable has to name the module in order to activate it — but nothing about the registration is a shortcut any more. What is below could be an assembly on somebody's disk without changing a line, and the assembly it lives in cannot see the editor's application at all, which is the part a compiler enforces rather than a convention.

⚠ What it takes from the host, it asks for. Five things: the shared mesh-editing state, the work plane, something that can bake a mesh into an asset, something that can read one back, and the Scene menu. Each is a Require or a FindMenu, so a host that has not got one refuses the module with a sentence naming it rather than throwing a null reference from inside Activate.

⚠ The editing state and the work plane are the editor's, not this module's. A mode outlives every scene the editor opens, and the plane is the one thing SceneGrid draws, SnapContext snaps to and the cube-grid tool counts in — doc 24 § D5 in one line, and in more than one shipping editor it is two numbers and a bug nobody manages to describe.

Fields and properties (2)

  • public const string ModuleId

    What the host activates it under, and what a plugin depending on it names.

  • public const string ModuleName

    What a plugin-management panel calls it.

Methods (1)

  • public void Activate(PluginContext context)

    Adds everything the plugin contributes.

Used by (1)

  • EditorModulesVixen.Editor.Host