public record class AuthoringAssemblyAn assembly that declares components or behaviours, named so its declarations run.
Remarks
Doc 36 § D5's fourth row, and F11's replacement. That was three hardcoded RunModuleConstructor calls inside the component panel — a list, in the application, of which subsystems exist — so a plugin whose components lived in a runtime assembly of its own could not appear in Add ▸ at all. This is a contribution: the application declares the subsystems it ships and a module declares its own, through the same registry.
⚠ A module initializer does not run until something touches the module, and that is the whole problem. A component registers itself to SceneComponentRegistry from a [ModuleInitializer] the generator emits — but the runtime is entitled to defer it indefinitely, so a registry read during the editor's construction sees whatever happened to have been loaded by then. What that looked like was an Add Component menu offering Camera and nothing else, with every component drawn in the viewport arriving a second later and never being offered.
⚠ A declaration rather than a scan, which is SceneComponentRegistry's own argument restated. Walking the output directory reads metadata a trimmed publish has already deleted, and it would make "what can be added" a question with a different answer in the editor, in a worker process and in a shipped game. What is declared is what somebody wrote down.
⚠ This does not make the components appear — it makes them appear on time. The panel re-reads the registries on every enumeration, so an assembly touched by anything at all shows up eventually. The failure this prevents is the one where nothing ever touches it: an audio subsystem the editor references and never calls into is a subsystem whose components exist in the build and in no menu.
Fields and properties (1)
public Type MarkerAny type in the assembly. A type rather than an Assembly because the caller has one to hand and writing typeof(AudioSource) says which components are meant, where typeof(X).Assembly says the same thing one indirection later.
Methods (2)
public AuthoringAssembly(Type Marker)An assembly that declares components or behaviours, named so its declarations run.
public void Touch()Runs the declaring assembly's module initializers, if they have not run.
Used by (2)
- ComponentsViewVixen.Editor.App
- EditorApplicationVixen.Editor.App