Setup Guide

Summary: Configure Save System for your own project.

For a new installation, create the settings file. Its defaults are ready to use; the configuration sections below are optional.

Create the settings file

Open Tools › Gley › Save System and click Create settings.

If you see Upgrade from v2, follow the Upgrade Guide.

The settings file is created at Assets/GleyData/SaveSystem/Resources/SaveSystemSettings.asset.

If settings already exist, you do not need to create them again.

Unity’s Save System window with the Create settings button highlighted.

Changing settings: the shared API reads settings when it creates its save service. After changing settings during Play mode, stop and restart Play mode to use the new values.

General settings (optional)

Open the General tab. Fresh settings use JsonUtility, enable encryption, disable compression, and use Saves as the save folder name.

SettingWhat it does
SerializerChooses how your data is converted to and from JSON. JsonUtility uses Unity’s built-in serializer. Choose Newtonsoft when you need support for types such as dictionaries or DateTime. If Newtonsoft is missing, the window offers to install it.
Encrypt savesEncrypts new saves with the project’s encryption key. Enabled by default. Individual platforms can override this setting.
Compress savesReduces save size at the cost of additional processing. Disabled by default. Individual platforms can override this setting.
Save folder nameSets the name of the folder where save files are stored. Defaults to Saves. With the File backend on non-WebGL platforms, the default location is Application.persistentDataPath/Saves.

Enter a folder name only, such as MySaves. To choose a full folder path, use Save folder override in the Advanced tab; it replaces this location. PlayerPrefs does not use this setting.

WebGL’s File backend uses persistent browser storage.

The Encryption key section shows the current Key ID. Use Show to reveal the full key or Copy to copy it. Manage keys… opens the key controls in the Advanced tab.

Keep your encryption key

Commit SaveSystemSettings.asset to version control and keep a backup. Existing encrypted saves need the key that was used to write them. A new key can’t read saves written with a lost key.

For step-by-step backup and restore instructions, see Managing encryption keys.

Save System General tab with JsonUtility, encryption enabled, compression disabled, the Saves folder name and the encryption key masked.

Platform overrides (optional)

You can leave Platform overrides empty. Save System uses File by default on Windows, Mac, Linux, Android, iOS, WebGL, and UWP. Any Unity platform not listed above is treated as Other and defaults to PlayerPrefs.

To change settings for one platform, click Add platform override and select the platform.

Column or controlWhat it does
PlatformIdentifies the platform affected by this row.
BackendChoose Default (File) or Default (PlayerPrefs) to use that platform’s built-in choice, or explicitly select File or PlayerPrefs.
EncryptGlobal (On) or Global (Off) follows Encrypt saves. Select On or Off to override it for this platform.
CompressGlobal (On) or Global (Off) follows Compress saves. Select On or Off to override it for this platform.
×Removes the override. The platform returns to its default backend and global encryption and compression settings.

For example, an Android override can keep Default (File) and Global (On) for encryption while setting compression to On.

In the Editor, Play mode uses the active build target’s platform settings. For example, if Android is the active build target and its override selects PlayerPrefs, Play mode also saves to PlayerPrefs on a Windows computer.

Platform override headers and one Android row using Default (File), Global (On) encryption and compression On, with the remove button and Add platform override control.
Example: enable compression on Android while keeping its default backend and global encryption setting.

Advanced settings (optional)

Open the Advanced tab when you need to change logging, override the file location, manage encryption keys, or configure v2 migration.

Setting or controlWhat it does
Log levelControls Console output. Choose None, Errors, Warnings, or Verbose. The default is Warnings.
Save folder overrideAn absolute path that replaces the complete save location for the File backend. Leave empty to use the default location. PlayerPrefs ignores this setting.
Manage keysPaste, restore or regenerate encryption keys. Follow Managing encryption keys for the steps.
Select settings assetLocates the settings file in the Project window.
Reset to defaultsRestores all settings to their defaults and clears platform overrides. The current encryption key and previous keys are kept.
Read v2 binary savesEnable under Advanced › Migration to read existing v2 binary saves. See the Upgrade Guide.
Remove unused v2 defines (when shown)Appears when old v2 files are gone but leftover v2 scripting defines remain. Click it to remove those defines.

Resetting defaults can also change the effective save location or backend. Review After you ship before using it in a released project.

Save System Advanced tab showing Warnings logging, an empty save folder override, settings asset and reset buttons, and encryption key management.

After you ship

Changing the effective save folder or switching between File and PlayerPrefs does not move existing saves. Your game will look in the new location and may appear to have lost progress. Keep the original location or migrate the saves before changing it.

Existing saves record their own serializer, encryption, and compression settings. Changing these defaults affects new writes; it does not convert existing saves. Older saves remain readable while their serializer and encryption keys remain available. Keep Newtonsoft installed if existing saves use it, and make sure a newly selected serializer supports the data you save.

Good to know

  • PlayerPrefs has no backup, and WebGL limits it to about 1 MB
  • JsonUtility skips dictionaries, properties and DateTime; switch to Newtonsoft for these
  • Browsers keep WebGL saves per domain, so moving the game to another domain starts with empty saves
  • On WebGL, avoid closing the page right after a save

Build checks

Save System checks the project before a build.

The build stops when:

  • The settings asset cannot be loaded, several settings assets can load, or the game would load a different asset from the one the settings window edits.
  • Encryption is enabled globally or in a platform override, but the current encryption key is missing or invalid.
  • Newtonsoft is selected but not installed, or the selected serializer is unknown.
  • Read v2 binary saves and its scripting define are out of sync.
  • A previously shipped encryption key is missing from both the current key and Previous keys. See how to restore missing keys.
  • The shipped-key record cannot be read or is damaged. See how to restore the record.
  • Settings are missing from a project that has recorded shipped keys. See how to restore the settings.

The build continues with a warning when:

  • Settings are missing and no shipped keys are recorded. Saving then uses the defaults without encryption.
  • Newtonsoft is selected with Medium or High managed code stripping. Preserve the constructors and setters your save types need using [Preserve] or link.xml, then test loading in the build.
  • The target platform is not officially supported. Test saving and loading on that platform, or provide a custom ISaveStorage.

Verify the setup

1. Resolve setup messages

Open Tools › Gley › Save System and select the General tab.

If Setup status appears, resolve the issues it lists. For messages not covered below, follow the instructions shown in the window.

  • Newtonsoft selected but missing: click Install Newtonsoft under Serializer and wait for installation to finish. This is the issue shown in the screenshot.
  • Legacy binary module: click the Fix button beneath the message. This makes Unity’s configuration match the Read v2 binary saves setting.
  • v2 leftovers found: follow the Upgrade Guide to complete the upgrade.
Setup status at the top of the General tab warning that the selected Newtonsoft serializer is not installed.
Example: Newtonsoft is selected but not installed. Click Install Newtonsoft under Serializer to resolve this message.

When these issues are resolved, Setup status disappears. If it is already hidden, continue below.

2. Test saving and loading

Use the included Quick Start scene to check that your current settings work:

  1. In the Project window, open SaveExample-QuickStart.unity from Assets/Gley/SaveSystem/Samples/QuickStart/Scenes/.
  2. Press Play.
  3. Click Add Coin and Level Up to change the values. Note the displayed coin count and level.
  4. Click Save. Confirm that the on-screen message begins with Saved.
  5. Stop Play mode, then press Play again.
  6. The scene loads automatically. Confirm that it shows Loaded and restores the same coin count and level you saved.

If the sample shows Couldn’t save or Couldn’t load, use the accompanying message to identify the problem.

3. Inspect the saved data (optional)

Stop Play mode, open Tools › Gley › Save System, and select Save Viewer. Click Refresh, select the quick-start save, and check that its stored coin and level values match your test.

See Save Viewer for inspecting, editing and restoring saves.

4. Test on your target platforms

Before release, repeat the test in a build on each platform you support. Save the changed values, close the build, and reopen it to confirm they are restored. Test each build directly; Save Viewer displays saves stored by the Unity Editor.

Save Viewer uses the active build target’s platform settings. Selecting Android as the active build target does not let it inspect saves on an Android device.

Find methods and result types in the API Reference, or explore optional features in Guides.

On This Page