Skip to main content

snapshot_scene

Function snapshot_scene 

Source
pub fn snapshot_scene(world: &GameWorld) -> Vec<u8> 
Expand description

Serializes the entire world to an in-memory byte buffer for play-mode restore. Returns an empty Vec on failure (caller logs and proceeds — the worst case is “Stop button leaves the live state in place”, which is preferable to a panic mid-play).