Gley Save System – Crash-Safe, Encrypted Save & Load


✔ One Cross-Platform API ... ✔ Sync, Async & Callback APIs ✔ JsonUtility or Newtonsoft ✔ Built-in Save Viewer & Editor ✔ Upgrade Path from v2 ... Saving & Loading


by Gley


Price History +

Save and load game data with one cross-platform API. Protect save files with crash-safe writes and an automatic backup. Includes save slots, encryption, data versioning, and an in-editor Save Viewer.

Features

  • One C# API for saving and loading serializable game data, with synchronous, async/await and callback methods.
  • Choose local file storage or Unity PlayerPrefs for each platform. Export and import saves as strings for your own server or cloud integration, or implement a custom storage backend.
  • Built-in JsonUtility or optional Newtonsoft.Json for data types such as dictionaries and DateTime. Both serializers support UTF-8 text and common Unity value types such as Vector3, Quaternion and Color.
  • Checksums detect save corruption. File storage keeps the previous save as a backup and automatically recovers from it when the current save is damaged and the backup is valid.
  • AES-256 encryption with HMAC-SHA256 tamper detection and key rotation. Encryption is enabled by default for new projects. GZip compression is optional.
  • Named save slots with last-saved time, save count and custom metadata. List, copy or delete slots through the API.
  • Data versioning with upgrade hooks for changes to your save data, plus migration tools for projects and player saves from All Platforms Save v2 (now Save System).
  • Save Viewer for browsing, editing, restoring and deleting saves in the Unity Editor. The settings window includes a setup checklist and build validation.
  • Full C# source and two sample scenes covering basic save and load, inventory, save slots and upgrading older save data.

Supported platforms


Windows, macOS, Linux, Android, iOS, WebGL and Universal Windows Platform (UWP). Requires Unity 2022.3 LTS or later.


Consoles aren’t officially supported. For a console’s native save API, implement a custom storage backend.




Compatibility notes

  • Unity object references such as sprites, prefabs and ScriptableObjects aren’t saved. Store IDs instead and resolve them when loading.
  • Encryption makes saves harder to edit. The key is included in the game build and can be extracted.
  • WebGL saves are tied to the site’s origin. PlayerPrefs storage on WebGL is limited to approximately 1 MB.
  • All supported platforms can read v2 JSON saves.
  • PlayerPrefs storage has no backup. Only file storage keeps a backup and can recover from it.

Documentation


Save System documentation



Save your classes, structs, lists and arrays with one line of code: API.Save(data, "progress"). Load them back with API.Load<PlayerData>("progress"), which returns your data plus a status your game can check. On a first launch, the data is filled with your defaults.

Formerly All Platforms Save. Version 3 is a full rewrite, with an upgrade path for your v2 code and your players' v2 saves.


Why Save System?


A phone dies mid-save, a player edits a file, or an update renames a field. Save System is built for these cases, and expected failures come back as a clear status, not an exception.


🚀 Key Features


✔ One Cross-Platform API

✔ Save Any Serializable Data

✔ Crash-Safe File Saves with Backup

✔ Encryption & Tamper Detection

✔ Save Slots with Metadata

✔ Data Versioning & Upgrades

✔ Sync, Async & Callback APIs

✔ JsonUtility or Newtonsoft

✔ Built-in Save Viewer & Editor

✔ Upgrade Path from v2

---


💾 Saving & Loading


Default Values on Load: a missing save returns your defaults, so a first launch needs no special code.

File or PlayerPrefs: choose the backend per platform. File storage is the default on supported platforms.

Two Serializers: JsonUtility (no dependencies, the default) or Newtonsoft for dictionaries, DateTime, null values and polymorphism.

Unity Types Included: Vector2/3/4, Quaternion, Color, Rect, Bounds, Matrix4x4 and more work with both serializers.

Optional Compression: GZip per project, per platform or per save.

Save to String: turn any save into text to send to your own server or cloud service.

Full UTF-8 Text: player names and text in any language are saved correctly.

---


🧰 Save Viewer & Editor Tools


Save Viewer: browse every save by slot and read it as formatted JSON, even when it's encrypted or compressed.

Edit Saves in Unity: change a value, give yourself coins or jump to a checkpoint, then save it back. Restore a backup or delete a save from the same view.

Data Warnings: the editor tells you when a field won't be saved, for example a Dictionary with JsonUtility, and how to fix it.

Settings Window: every setting in one window under Tools > Gley > Save System, with per-platform overrides and full undo.

Setup Checklist: shows only what needs your attention.

Build Checks: a missing encryption key, a missing serializer or a misplaced settings file stops the build instead of reaching players.

---


🛡️ Crash Safety & Recovery


Crash-Safe File Writes: each save is written to a temporary file and swapped in only when complete, so a crash or power loss doesn't leave a half-written save.

Automatic Backup: file storage keeps the previous good save as a backup.

Automatic Recovery: if the current save file is damaged, it loads from a valid backup when one is available.

Corruption Detection: every save, file or PlayerPrefs, carries a checksum.

Broken Saves Kept: damaged save files are set aside for inspection instead of deleted.

Newer Saves Protected: if a player runs an older build, saves written by a newer version are not overwritten.

Quit & Pause: if the player quits or leaves a mobile app while an async save is still writing, Save System waits up to 2 seconds for it to finish.

---


🗂️ Save Slots


Named Slots: save each player profile or save game in its own slot.

Slot Metadata: last saved time and save count are kept automatically; add your own fields such as level, playtime or hero name.

Fast Slot Lists: show a load menu without loading the saves themselves.

Copy & Delete: copy, delete or check any slot with a single call.

---



🔄 Data Versioning


Version Your Data: mark a save class with [SaveVersion(2)] when its fields change.

Upgrade Steps: rename or change fields in old saves before they load.

Upgrade Hook: fill in new fields with OnUpgrade(fromVersion) on your data class.

Old Saves Keep Loading: your migration steps are applied when older saves load, so players keep their progress when you update your game.

---


🔒 Encryption & Tamper Detection


One Toggle: AES-256 encryption plus tamper detection.

Unique Key per Project: cracking another game's saves doesn't crack yours.

Key Rotation: regenerate the key at any time; saves made with older keys still load.

Your Own Key: paste a key, or set one at runtime from your server.

Lost Key Check: the build stops if the encryption key from a previous release is missing, so players don't lose saves to a lost key.

---


⚙️ Developer Friendly


Sync, Async & Callbacks: every save and load comes in all three forms.

Off the Main Thread: async and callback saves and loads run compression, encryption and disk access on a worker thread (WebGL runs everything on the main thread).

Status Results: expected failures return a status such as NotFound, Corrupt or Tampered instead of throwing.

Events: get notified when a save starts, a save or load completes, or a backup is used.

Custom Storage: plug in your own backend, such as a console or cloud save API, through ISaveStorage.

Test Friendly: an in-memory storage is included for your own tests.

No Dependencies: the runtime uses only Unity's own modules. Newtonsoft is optional.

Works with Domain Reload Off.

Full C# Source Code Included.

---


⬆️ Upgrading from All Platforms Save


Old API Calls Keep Working: v2 API calls still compile (marked obsolete), so you can move to the new API at your own pace.

Player Saves Carry Over: through the old calls, v2 saves load as before. With the new API, add one line per save (API.MapV2): the old v2 save is read on load, and the next successful save writes it in the new format.

Files and PlayerPrefs: v2 JSON saves load from both.

v2 Binary Saves: need the optional "Read v2 binary saves" reader, which the project upgrade turns on when your v2 project used binary saving. WebGL can read v2 JSON saves only.

Guided Project Upgrade: the settings window detects your v2 settings and files and lists every change. Once you confirm, it carries over your platform choices and serializer and removes the listed v2 files.

Please follow the upgrade guide in the documentation before updating.

---


🕹️ Demos


WebGL | Android | PC


📦 Included Content


Runtime and Editor Tools: with full source code.

Quick Start Sample: save, load with default values and delete in one short script.

Save Example Sample: three save slots with player data, an inventory and an object position, plus an older-version save upgraded on load. The save code is kept apart from the UI, so you can copy it into your own game.

Any Render Pipeline: samples work in Built-in, URP and HDRP, with the old or new Input System.

---


⚠️ Good to Know


Platforms: tested on Windows, macOS, Linux, Android, iOS, WebGL and UWP. Other platforms have not been tested.

Consoles: not officially supported. They use PlayerPrefs by default, or you can plug in your platform's save API through ISaveStorage.

PlayerPrefs: no backup, and WebGL limits PlayerPrefs to about 1 MB.

Cloud Saves: not built in. Use Save to String with your own cloud service.

Unity Object References: sprites, prefabs and ScriptableObjects are not saved. Save an ID instead.

JsonUtility: skips dictionaries, properties and DateTime. The editor warns you; switch to Newtonsoft for these.

Encryption: keeps saves private and stops casual editing. The key ships inside your game, so it does not stop a dedicated cheater.

WebGL: browsers keep saves per domain, so moving your game to another domain starts with empty saves. Avoid closing the page right after a save.

Unity Version: 2022.3 LTS or newer.

---


💬 Documentation & Support


For fast technical support and the ability to vote on upcoming features, join our Discord community.

Documentation | Discord | Email | Website

IMPORTANT! Please include your Unity Asset Store invoice number in your first support message.


If you are interested in other assets made by GLEY, visit our Asset Store Page.