Class UnityGameSaveInstaller
Unity-specific installer for the GameSave system. Loads a UnityGameSaveSettings
asset (soft fallback to the PlayerPrefs default backend and a default slot count when none is
found), resolves the configured backend via GameSaveBackendFactory, and
constructs the UnityGameSaveService. Unless
RouteCheckpointsIntoActiveSlot is explicitly turned off,
also registers a CheckpointsSection and exposes a ready-to-use
GetCheckpointStore() for a project that wants its Checkpoint aggregate's snapshots
to travel inside the active save slot instead of a separate store.
Namespace: Serenity.GameSave.Installation.Installers
Assembly: Serenity.UnityGameSave.Installation.dll
Syntax
public class UnityGameSaveInstaller : GameSaveInstaller, IFoundationInstaller, IInstaller
Constructors
UnityGameSaveInstaller(IEventDispatcherService, ILogService)
Initializes the Unity GameSave installer with required service dependencies.
Declaration
public UnityGameSaveInstaller(IEventDispatcherService eventDispatcherService, ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| IEventDispatcherService | eventDispatcherService | Dispatcher used to broadcast save/load/delete signals. |
| ILogService | logService | Service for logging and error reporting. |
Methods
GetCheckpointStore()
Gets the IKeyValueStore that routes checkpoint payloads into the active save
slot (see RouteCheckpointsIntoActiveSlot), for a project
to hand to its own UnityCheckpointInstaller. Returns null when routing is
disabled, or when this installer has not been installed yet.
Declaration
public IKeyValueStore GetCheckpointStore()
Returns
| Type | Description |
|---|---|
| IKeyValueStore |
GetSettings()
Gets the loaded settings asset, or null when none was found.
Declaration
public UnityGameSaveSettings GetSettings()
Returns
| Type | Description |
|---|---|
| UnityGameSaveSettings |
Install(ILogService)
Installs the GameSave system: loads the settings asset (optional — falls back to the PlayerPrefs default backend and a default slot count when none is found), resolves the configured backend, constructs the service, and assigns it to _service.
Declaration
public override void Install(ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogService | logService | Logging service for the installation pass. |