public record class VfxEffectContentA particle effect as a build wrote it and a game loads it.
Remarks
The content form of VfxCompiledGraph, and the piece whose absence meant a game could not load a .vxvfx at all. The authored file is a node graph — nodes, edges, positions, the numbers somebody typed — which only the editor can read, and docs/overview.md listed it among the formats "whose compiler is still owed". This is what the compiler writes: the graph already reduced to the flat instruction list both backends run, with nothing of the editor in it.
Why the rows are mirrors rather than the runtime types annotated. VfxOperation and its siblings are positional record structs, and the serializer generator emits for a parameterless constructor and init members — so annotating them in place would mean rewriting types that every graph in every project constructs positionally. The mirror costs one row per runtime type and buys the runtime types keeping their shape. MaterialContent makes the same split for a different reason, and says so.
⚠ Attributes is not stored, and must not be. It is derived from what the operations read and write, and Compile derives it again on the way back in — so a stored copy is a second answer to a question with one answer, and the two would disagree the first time an opcode's declaration changed and an old asset was loaded by a new build. The same argument applies to every other derived fact here, of which that is the only one.
⚠ An invalid graph throws on the way back. Compile refuses an updater that reads an attribute nothing writes, and ToGraph goes through it rather than round it — so content the importer never produced fails loudly rather than running over zeroed memory, which is the failure mode with no symptom.
Fields and properties (9)
public const int CurrentThe version this reader speaks.
public int VersionWhich version of the format this is.
public int CapacityHow many particles one instance has room for.
public VfxSpawnerRow[] SpawnersWhat makes particles.
public VfxOperationRow[] InitializersWhat a particle starts as.
public VfxOperationRow[] UpdatersWhat happens to it, every step.
public VfxCustomAttributeRow[] CustomsThe attributes the graph declared for itself, in slot order.
public bool DrawnWhether anything draws it.
public VfxRendererRow RendererHow it is drawn, when Drawn says it is.
Methods (2)
public VfxCompiledGraph ToGraph()This content as the graph a simulation runs.
public static VfxEffectContent From(VfxCompiledGraph graph)One compiled graph as the content a build writes.
Used by (7)
- AssetVfxEffectSourceVixen.Engine.Renderer
- EntryVixen.Engine.Renderer
- TypeRegistrationVixen.Rendering
- VfxEffectContentTestsVixen.Rendering.Tests
- VfxEmitterVixen.Rendering
- Vixen_Rendering_Vfx_VfxEffectContentSerializerVixen.Rendering
- VfxImporterVixen.Editor.Assets