Builtin Library
README.md
proc.ops.sinks
Sink ops persist a generated value through the owning .assetType. mesh.write serializes a Geometry into a <name>.mesh/
loader folder; texture.write, material.write and population.write persist
their value the same way, and debug.dump and debug.validate report on a
value. bundle.write and scene_fragment.write, the sinks of a Prefab or
Bundle, live in proc.ops.prefabs and follow the same rules below.
ops(geometry, fields, types) returns the family and procPacks/sink.procPack
registers it. Part of @builtin::systems.procgen.proc.
What the output says about itself
Every write sink also takes description and tags. The asset it writes
carries them as its .metadata description and tags, and the description as
its README, so what a graph wrote is found and read by what it is.
bundle.write and scene_fragment.write pass them on to every mesh, material
and population they write for the whole, each saying which whole it belongs
to (Mesh 0 of `crate`. ...). A Generator's apply() describes its bundle
this way: the graph, the graph time and params, then the graph's own
description, tagged with procgen and the graph's tags.
Where the output lands
Every write sink accepts two optional params that choose the destination:
dest— an absolute path (/source/env/rock.mesh) written verbatim.folder— a subfolder under/source(folder = "props"→/source/props/<name>.<type>).
With neither, baked output lands under /source/generated/ rather than the
source root, so a world's source tree stays organized instead of accumulating
loose assets at its root. A sink that realizes companion assets (a material's
slot textures, a template's meshes) places them in the same directory as the
asset that persists them.