scene_snapshot.h
| File Path | engine/include/conjure/scene/scene_snapshot.h |
| API ↗ | Scenes, hierarchy and prefabs, Scene files, prefabs and snapshots |
Everything needed to put a scene back the way it was. Move-only; owns its bytes.
Structs
| File | Description |
|---|---|
scene_snapshot |
Everything needed to put a scene back the way it was. Move-only; owns its bytes. |
snapshot_guid_entry |
One row of the guid index of a snapshot: an entry's guid and its archive index. |
Functions
Public
capture
capture[[nodiscard]] CONJURE_API core::result<scene_snapshot> capture(
const scene &source);Captures every entity of the tree, the root order and owners, the settings and the name, and indexes the guids. BAD_FORMAT naming the entity when one carries a layer index of 32 or more, which restore would refuse only after clearing the scene.
restore
restore[[nodiscard]] CONJURE_API core::result<void> restore(
scene &target,
const scene_snapshot &snapshot);Clears the scene and instantiates the snapshot with kept guids, restores settings, name, root order and owners and binds asset references. On failure the scene is left empty.