ComponentRegistrationGenerator
public sealed class ComponentRegistrationGeneratorDeclares every component this assembly can put in a scene, before any of its code runs.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Two attributes are two different claims, and both have to be made. [Component] says the ECS may attach it to an entity; [DataContract] says it can be described and turned into bytes. A type carrying both is by construction something a compiled scene can carry, and a type carrying only the first is a handle the bridge that owns it writes — PhysicsBody, and the renderer's equivalent. Those are excluded with no denylist and no opt-out, which is the whole reason the rule is a conjunction rather than a marker of its own.
⚠ Compile-time discovery, which is the opposite of an assembly scan. What gets registered is what this generator saw in the source, so it survives trimming and NativeAOT and it is the same set in the editor, in a build worker and in a shipped game. The registry's own remarks used to argue for hand-written calls on exactly those grounds; a scan would indeed have been wrong, and this is not one. It is the bargain SerializerRegistration and TypeRegistration already struck.
⚠ Nothing is emitted for an assembly that cannot see the registry. Vixen.Net declares components and does not reference Vixen.Engine, so naming the registry there would not compile. Wiring this generator into such an assembly is deliberately a no-op rather than an error: the day it grows a reference, its components register with nothing else asked of anybody.
Methods (1)
public void Initialize(IncrementalGeneratorInitializationContext context)Called to initialize the generator and register generation steps via callbacks on the