Saving and scenes
Saved games
A save is a Lua table: numbers, booleans, text, Vec3 values and tables of those.
Entities and functions cannot be saved. Save what is needed to make them again.
SaveData.Exists, SaveData.Delete and SaveData.List round it out. A save's name is letters, digits, spaces, dashes and underscores.
Where saves go
Each game has a folder of its own in the user's data directory, named after the project:
Pass --user-data DIR to the editor or the runtime to use another folder.
Player settings
Settings.Save() keeps the bus volumes, the key bindings and the window size for the next run. Settings.Reset() goes back to the project's own.
Switching scenes
A switch happens at the end of the frame, never in the middle of the script that asked.
Keeping things across scenes
Tick Persistent on a top-level entity and it stays through Scene.Load, with its children, its scripts and their values. Use it for a player, a score keeper, or music that plays on.
An entity that stayed is not made a second time when a scene that contains it is loaded again.