Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

procgen.generators

Lists every live procedural generator in the scene: each entity carrying a Generator component, with what it plays and how its cooking stands. It takes no arguments. Reach for it to find what is generating, or why a generator's output looks stale, before changing one with procgen.adjust or applying it with procgen.apply. procgen.search is its counterpart over graph assets.

Each record is { entity, name, graph, output, params, playback, children, cooking, cookProgress, lastCook }:

  • graph: the name of the graph it is bound to; output: its selected output (empty for the whole graph); params: its param overrides.
  • children: how many entities stand under it.
  • cooking: whether a cook of it is in flight, with cookProgress ({ nodesCooked, nodesTotal, currentNode }) while it is.
  • lastCook: its newest finished cook, { status, durationMs, error, failedNode }.
  • playback: where its clock stands and what running it costs, as Generator:playback() answers it (its nodes left out): among the fields, playing, held, frame, time, first, last, fps, loop, realTime, cookedThrough, cooked, hits, cost, onDevice and drawn, which says per point output whether its elements are one instanced draw or an entity each, and what made them entities.
local g = tools.use("procgen", "generators")

Part of procgen.toolbox, called as tools.use("procgen", "generators", ...) (zero procgen generators in the engine shell). Returns { count, generators }.