GS_Save

The persistence system — save files, load data, and track progression with managers, savers, and record keepers.

Overview

The Save system is the universal means of storing, loading, and handling game data. It provides a centralized Save Manager for file operations, entity-level Saver components for automatic data capture, and a Record Keeper for lightweight progression tracking — all backed by JSON-formatted save files that work across PC, console, and mobile platforms.

Every component that needs to persist data plugs into this system through one of two patterns: extend the Saver base class for complex per-entity data, or use the Record Keeper for simple key-value records.

Architecture

GS_SaveManagerComponent (singleton, spawned by Game Manager)
  
  ├── Manages save files via O3DE SaveData gem
       CoreSaveData file tracks all saves + metadata
       Individual save files store game state as JSON
  
  ├── SaveManagerOutgoingEventBus
       Broadcasts OnSaveAll / OnLoadAll to all Savers
  
  ├── GS_SaverComponent (base class, on any entity)
       Listens for global save/load events
       Calls BuildSaveData()  SaveData() to persist
       Calls LoadLocalData()  ProcessLoad() to restore
       
       ├── BasicEntitySaverComponent (saves Transform)
       ├── BasicPhysicsEntitySaverComponent (saves Transform + Rigidbody)
       └── Your custom savers...
  
  └── RecordKeeperComponent (extends GS_SaverComponent)
        Simple key-value records (string  int)
        Lives on the Save Manager prefab entity

Components

ComponentPurposeDocumentation
GS_SaveManagerComponentCentral save/load controller. Manages save files, triggers global save/load events, provides data access to all savers.Save Manager
GS_SaverComponentBase class for entity-level save handlers. Override BuildSaveData() and ProcessLoad() to persist any component data.Savers
RecordKeeperComponentLightweight key-value store for progression tracking (string name → integer value). Extends GS_SaverComponent.Record Keeper
BasicEntitySaverComponentPre-built saver that persists an entity’s Transform (position, rotation).List of Savers
BasicPhysicsEntitySaverComponentPre-built saver that persists an entity’s Transform and Rigidbody state (velocity).List of Savers

Quick Start

  1. Create a Save Manager prefab with the GS_SaveManagerComponent.
  2. Optionally add a Record Keeper to the same prefab for progression tracking.
  3. Add the Save Manager .spawnable to the Game Manager’s Startup Managers list.
  4. Attach Saver components to any entities that need to persist data.
  5. Call NewGame / LoadGame through the Game Manager — the Save Manager handles the rest.

See Also


Save Manager

The central save/load controller — manages save files, triggers global persistence events, and provides data access for all savers.

Savers

The base class for entity-level save handlers — override BuildSaveData() and ProcessLoad() to persist any component data automatically.

Record Keeper

Lightweight key-value progression tracking — store and retrieve named integer records without writing a custom saver.