edit.tool
This package holds more than this page lists. See all of its files in its world.
README.md
wld.edit
Returns the engine to edit mode with gameplay at rest. Leaving play would lose live changes the scene does not carry, so the engine's safeguard refuses while any of them are unaccepted and names what they are. List them with sceneAuthoring.changes, settle them with sceneAuthoring.acceptChanges or sceneAuthoring.rejectChanges (either takes everything or a selection), then call this again; engine.discardPlayChanges(), called inside the play session, throws them all away so the next call flips. The flip moves the mode at once and rebuilds the scene for edit over the frames after it; the call returns once that rebuild has ended.
Returns { mode, paused, froze, settled, leftPlaySession?, timings }: the run state the call produced, and whether the simulation it met was running and is now at rest. When other callers take part in the play session too, the call takes only the caller out of it (leftPlaySession), and the engine keeps playing for them. timings says where the call's time went, in whole milliseconds: totalMs for the call, writeMs for the mode write, rebuildMs for the wait on the scene rebuild, and the frames the call spanned; a call that waited on a rebuild also carries its phases (drain, teardown, load, respawn, settle, review) and its loads (each scene load's name, the ms the rebuild spent in its call, its instantiate, its records and whether it has settled), and layers.lastRebuild() reports that rebuild in full.