API Reference

Summary: Find Save System API members by topic.

Namespace Gley.SaveSystem

Service

MemberDescription
DefaultGet the shared save service used by the static API.

Save & Load

MethodDescription
SaveSave data by name, either synchronously or with a completion callback.
LoadLoad data by name, either synchronously or with a completion callback.
ExistsCheck whether a named save exists in a slot.

Async

MethodDescription
SaveAsyncSave data by name and await the result.
LoadAsyncLoad data by name and await the result.

Slots

MethodDescription
ListSlotsList the existing save slots.
SlotExistsCheck whether a named save slot exists.
CopySlotCopy all saves from one slot to another.
SetSlotMetadataStore one or more named text values on a slot.

Delete

MethodDescription
DeleteDelete a named save from a slot.
DeleteAllDelete every save across all slots.
DeleteSlotDelete a slot and all its saves.

Strings

MethodDescription
SaveToStringConvert data to save text for storage you manage.
LoadFromStringLoad data from text produced by SaveToString.

Protection

MethodDescription
SetKeySet the 32-byte protection key from bytes or Base64 text.

Custom Storage

MethodDescription
SetStorageSwitch to a different storage backend.

Upgrades & Migration

MethodDescription
AddUpgradeStepRegister a step that upgrades older data during load.
MapV2Map a save name to a version 2 file path or PlayerPrefs key.

Types

Options

TypeDescription
SaveOptionsSelect a slot for a save or load, or override protection and compression when saving.

Results and events

TypeDescription
SaveResultInspect the outcome of a save, delete, or other operation that returns a result.
LoadResult<T>Inspect loaded data, errors and backup recovery information.
SaveStatusIdentify the outcome of a save or load operation.
SlotInfoRead the save names and metadata reported for a slot.
SaveEventInfoIdentify the save and slot associated with a SaveService event.

Storage and recovery

TypeDescription
SaveServiceThe object behind API.Default. Subscribe to its events to react to saves and loads.
ISaveStorageImplement your own storage backend, for example to save to the cloud.
IBackupStorageAdd temporary and backup copies to a custom storage so loads can recover.
MemoryStorageKeep saves in memory for tests and temporary sessions.
StorageCandidateDescribe a stored copy or a read failure during backup recovery.
CandidateKindIdentify a stored copy used during recovery.

Versioning

TypeDescription
SaveVersionAttributeMark the data version of a serializable class or struct.
ISaveUpgradableUpdate loaded data in code after an older version is read.
ISaveUpgradeStepTransform the saved data of one version before it is read into the current type.
JsonUpgradeStep<T>Transform older saved JSON before reading it into the current data type.

Events

EventDescription
SaveStartedRuns when a named save starts, before the data is prepared.
SaveCompletedReports the result when a named save finishes.
LoadCompletedReports the final status when a named load finishes.
RecoveredFromBackupRuns when a load recovers from a temporary or backup copy.

Browse the Methods, Types and Events group pages.

On This Page