Builtin Library
README.md
scene.revert
Discard a scene's unsaved edits and restore its saved scene.json.
Takes an optional scene name; without one the active scene reverts.
The undo for scene.clean / scene.remove and any edit-mode change, and the
counterpart to scene.save. Every edit since the last save lives in the
scene's dirty overlay until you commit it; this throws that overlay away and
respawns the scene from its saved state.
Because the dirty overlay belongs to the scene ASSET (not the runtime layer), a
revert works whether or not the scene is currently loaded — pass a name to
revert a specific scene, or omit it for the active one. This reverts only the
edit-mode dirty overlay; it is not the play-mode baseline restore.
Returns { scene, discarded } — discarded is true when unsaved edits were
thrown away, false when the scene was already clean.