Builtin Library
README.md
editor
What an editor action committed, and why it committed less than it was asked for. A gizmo drag, a delete, a duplicate, a command dispatch and a selection gesture each publish one record when they close; this toolbox reads them.
-
layout — the editor's dock arrangement: which layouts can be applied, and switching to one by name. Every layout is an
.editorLayoutasset: the standard ones the editor ships and the ones saved on the world through Window > Save layout. With no name it lists them (name, kind, title and description of each), so the list is read from the engine rather than from here. The editor comes up inagentView(the scene and DotBot on the right) when nothing else names a layout.editor.layout { name = "recording" }before a recorded agent run puts the scene beside the agent's terminal, andeditor.layout { name = "watch" }puts the newest frame an agent captured under the scene. -
observe — the whole record: the last action of each kind, the history behind them, and how many of each this session ran. Each record names its outcome (
committed,partial,refused,cancelled,noop) and, when it is not a clean commit, one reason from a closed set.
When something you moved did not go where you put it, call this. The drag record separates what the pointer asked for from what the gizmo applied after snapping, and both from the transform the engine actually holds — read back from the engine per entity, not recomputed from the drag. An entity the engine refused, converted, or lost to a despawn mid-drag says so by name, and a press that landed on a handle and started no drag at all says why it started none.
editor.observe also answers why a menu action did nothing: a command's record
tells a missing id from a disabled command from a broken enabled-predicate from
a body that raised, each with the error text.
The editor's own per-frame cost is named in the profiler alongside this:
script.editor.gizmo.tick, script.editor.viewport.select,
script.editor.selection.highlight, and script.editor.panel.<id> per dock
panel. Read them with profiler.stats().