procGraph (asset type)
Shape
A <name>.procGraph/ folder containing:
init.luau— the graph's definition. Returnsproc.define(id, function(g) … end).graph.json— the compiled form (proc.graph.v1), written by this type frominit.luau. Generated, never hand-edited.README.md,.metadata— the universal asset files.
Authoring
Edit init.luau. The type recompiles on the write, rewrites graph.json, and
every live Generator bound to the asset re-cooks from it — there is no build
step between saving and seeing the result.
A recompile is cheap however large the graph: node results are keyed by content, so recompiling an unchanged node reuses its cooked output, and an edit invalidates only that node and the ones downstream of it. Changing the last step of a landscape does not re-run the erosion above it.
Two words worth keeping apart, because both happen here:
- compile —
init.luau→graph.json. Produces the graph. - cook — each node performing its operation to produce a value. Runs the
graph. Driven by a
Generator, reported byprocgen.cooks.
Using one
Through the ref rather than a path string: ref:eval("mesh") evaluates an
output, ref:inputs() lists the knobs a Generator can override by name,
ref:outputs() the values it produces, ref:validate() type-checks it, and
ref:asOp() wraps it so another graph can composite it as a node.
Generated outputs (meshes, materials, textures, bundles) are persisted through
their own asset types — never asset.write_*.
Related
@builtin::modules.proc— the authoring + evaluation model.procgen.toolbox—preview,spawn,bake,validate,ops,schemaand the wider tool family.