SaveLoadManager (Orchestrator)
Overview
Central coordinator that invokes all subsystem managers in a fixed order. Optionally auto-loads at startup if a flag is set; otherwise resets Atom variables to their InitialValue.
References
- AtomSaveLoadManager
atomManager - RuntimeSaveLoadManager
runtimeManager - MapSaveLoadManager
mapManager - UpgradeSaveLoadManager
upgradeManager - BoolVariable
shouldLoadData
Startup Behavior
On Start():
- If
shouldLoadData.Value == true: callsLoadAll()then sets the flag to false. - Else: calls
atomManager.ResetAll().
Reset() auto-finds any missing manager references in the scene.
Call Order
The manager intentionally preserves this order for both save and load:
- Atoms
- Runtime objects (Laboratories, Distribution Spots, Routes)
- Regions
- Upgrades
Public API
void SaveAll()/void LoadAll()— invoke each subsystem in order.void ClearAllSavedData()— deletes all known save files, then resets Atoms.void SaveAndQuit()— saves everything, thenQuitGame().void QuitGame()— loads scene index 0.static bool HasSavedData()— returnstrueonly if all four save files exist.
Save Files Affected
atoms_save.json,runtime_save.json,regions_save.json,upgrades_save.json.