Shipready: Reference

Version 1.0 · Rare Geometry

This Reference explains how each part of Shipready works: the save tree and files, what can be saved, world persistence in depth, reliability and recovery, file options, the save menu's options, the editor tools, performance and logging. For step-by-step tasks, see the Guide; for the C# API, the API Reference.

Settings in bold, such as Save Version, are fields on the settings asset ShipreadySaveSettings. To change one, select the asset in the Project window; most are on its Basics tab, the rest under Advanced.

Contents #

  1. Core concepts - The save tree - Files: slots, the global file, autosaves and the quicksave - File names and the save folder - Profile folders: several players on one PC - Categories - Save versions - The settings asset
  2. Saving plain values - What can be saved - Dictionaries
  3. Saving and loading - Threads and the file queue - Save Actions, Save Events and Save Point
  4. Slots and slot info - What a slot records
  5. World persistence - Parents - Load modes - Physics - Component savers - DontDestroyOnLoad objects - World data in the file - The registries
  6. Reliability and recovery - Crash-safe writes - Checksums - Rotating backups - Automatic fallback - Damaged files are kept - Disk full and access denied - What the player sees
  7. File options - Readable JSON and pretty printing - Compression - Encryption - How the options combine - Changing options in an update - Edited saves: the checksum policy - The global file's own options
  8. The save and load menu - Modes and cards - Actions and confirmations - Menu settings - Controls - The Game Menu - The saving indicator
  9. Editor tools - The Start window - The Start window - The Start window - Setup Wizard - The settings asset's Inspector - The Play Mode toast - The settings asset's Inspector - The Play Mode toast - The settings asset's Inspector - The Play Mode toast - Save Inspector - Diagnostics - The Saveable inspector - Other menu commands
  10. Performance - Background work - Profiler markers - Where the time goes - Compact files for release - Measured benchmarks
  11. Logging and reports - Log levels - The one-line report - The report

Core concepts #

The save tree #

Everything Shipready saves goes into one structure, the save tree. A save file is a small envelope around it:

  • a header: the save format, your game's save version, the game version, Shipready version, the time of the save in UTC, a checksum and how the file is packed;
  • the slot info the menu shows: name, playtime, location, game version and summary lines;
  • the data: one section per category, plus a players section in co-op games.

In memory, the data part is SaveKit.Data. Your plain values go there, and the Saveable objects in your scenes write their state there when a save gathers it. A save copies the data into the file; a load replaces it. The menu, the Save Inspector, Diagnostics and recovery all read this same structure.

Files: slots, the global file, autosaves and the quicksave #

File Default name What it holds
Manual slots slot_01.save to slot_10.save One playthrough each. 10 slots by default, adjustable from 1 to 99.
The global file global.save The Global categories, such as Settings. One file for the whole game.
Autosaves autosave_1.save to autosave_3.save Each autosave overwrites the oldest of these files, so an autosave never replaces the newest one. 3 by default, adjustable from 1 to 10.
The quicksave quicksave.save One extra slot for a quick-save key. Off by default.

Slot files, autosaves and the quicksave hold the Slot categories. The global file holds the Global categories. Loading a slot never touches the global file, so a player's settings never go back to an older state.

File names and the save folder #

Saves are kept in a folder inside Application.persistentDataPath. On Windows that is:

%USERPROFILE%\AppData\LocalLow\<Company Name>\<Product Name>\Saves
  • Company Name and Product Name come from Project Settings → Player. The Editor and a Windows build use the same folder.
  • Saves is Save Folder Name. If Profile Folder is set, saves go into that folder inside it (see Profile folders).
  • Once Shipready has started, SaveKit.Storage.DescribeLocation() returns the folder. The Save Inspector's Copy folder path button shows it in Explorer.

You can change the names in the settings asset:

Setting Default Notes
Slot File Name Format slot_{0:00} {0} is the slot number; {0:00} gives two digits. A pattern without {0} stops Shipready starting with SettingsInvalid (SK153).
Autosave File Name Format autosave_{0} {0} is the autosave number.
Global File Name Base global
Quicksave File Name Base quicksave
File Options → File Extension .save Used by the slots, the autosaves and the quicksave, and by the global file unless it has its own extension (see The global file's own options).

Beside each save you may find these files. Only the real saves end in .save, which is what keeps a Steam Cloud pattern of *.save clean:

File What it is
slot_01.save.tmp A save that was being written when the game stopped
slot_01.save.bak1, .bak2 … Rotating backups, newest first. A .bak0 working copy exists for a moment during each save.
slot_01.save.corrupt-<time> A damaged file, moved aside and kept for support
slot_01.save.thumb.png The slot's thumbnail
slots.index A cache of slot info that makes the menu fast. Shipready checks it against each file before using it.

Profile folders: several players on one PC #

Profile Folder puts the saves into a folder inside the save folder, so that two people who share a PC each keep their own saves.

  • A fixed name, such as Player1, is used exactly as written.
  • {profile} is replaced, when Shipready starts, by SaveKit.ProfileId, which your game sets at runtime, for example to the player's Steam ID. A Profile Folder of {profile} puts the saves of the Steam user 76561198000000000 into Saves/76561198000000000. The placeholder can also sit inside a longer name, such as Profile_{profile}.

Shipready never works out the id itself: it only knows what your game gives it. So with {profile}, Shipready has to wait for your game:

  1. In the settings asset, set Profile Folder to {profile} and switch Initialise Automatically off.
  2. When your game knows who is playing, set the id, then start Shipready:
SaveKit.ProfileId = playerId;               // for example the player's Steam ID, as a plain number
SaveResult started = SaveKit.Initialise();
if (!started.Success) Debug.LogError(started.ToString());
  • No id, no start. With {profile} in Profile Folder and an empty SaveKit.ProfileId, Shipready refuses to start with SettingsInvalid (SK153) rather than mix two players' saves. With Initialise Automatically still on, that shows in the Console as "Shipready could not start by itself". When there is no player id, for example in the Editor without Steam running, set a fixed one such as local.
  • What an id may hold. Letters, digits, - and _ are always fine. An id with a character that a folder name cannot hold, such as /, \, : or *, with .., or with spaces at either end, is refused with SK153.
  • When the id is read. Shipready reads SaveKit.ProfileId only when it starts, so changing it later does nothing until the next start. To switch players, call SaveKit.Shutdown(), set the new id and call SaveKit.Initialise(); Shutdown also removes your event handlers and co-op hooks, so set them again afterwards. Shutdown keeps the id; a new Play session forgets it.
  • Keeping automatic start on. Unity runs a static method marked [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] before Shipready starts by itself, so a game that already knows the player at that moment can set SaveKit.ProfileId there instead. SubsystemRegistration is too early, because Shipready clears the id at that moment, and BeforeSceneLoad races Shipready's own start.
  • In the Save Inspector, outside Play Mode, there is usually no id, so the Inspector lists the save folder itself, with each player's folder inside it. Use Choose folder... to look into one.
  • Decide before release. Adding a profile folder in an update moves the saves to a new folder, so existing saves seem to disappear (SK100).

The Steam Cloud guide uses {profile} with the player's Steam ID.

Categories #

Every saved value belongs to one category. A category decides two things: which file the value goes into, and which saves include it.

  • Slot categories are stored inside each save slot. Progress, inventory, quests and world state belong here.
  • Global categories are stored in the one global file. Player settings belong here.

A new settings asset starts with five categories:

Category Scope Role
Settings Global Player settings
Progress Slot The Default Category: values saved without a category go here
Inventory Slot
Quests Slot
World Slot The World Category: Saveable objects are saved here unless they name another category

You can rename them, add your own and change their scope on the settings asset's Advanced tab, under Categories (In each slot or One shared file), then Apply the categories. The default category and the world category must exist, or Shipready refuses to start.

  • Renaming a category in the settings does not rename it inside save files that already exist. Old saves keep the old name until a migration step renames it (see GameUpdates.md).
  • A name the settings do not define is reported once in the Console as CategoryUnknown (SK150), and its values are never saved. Names are case-sensitive.
  • Partial saves. A save or load can include all categories or only some, for example a checkpoint that saves only Progress and World. See Partial saves and loads.
  • Reserved names. No category may be called players: every save keeps each co-op player's own data under that name, beside the categories, so Shipready refuses to start with SettingsInvalid (SK153) when one is. Inside a category that holds Saveable objects, Shipready uses the keys scenes, persistent, loadedScenes and activeScene itself, so do not store plain values under those keys in such a category.

Save versions #

Every file records the save version it was written with. Save Version is a whole number in the settings asset, 1 by default. Raise it when your saved data changes in a way old saves need help with, and write a small migration step that upgrades version N to N + 1. Migration steps run in order when an old file loads. Saves from a newer version of your game are refused with NewerVersion (SK120) and left untouched.

GameUpdates.md explains when to raise the version, how to write steps, the tree editing helpers, and how to test with old save files.

The settings asset #

Every setting, with its default. Select the asset to edit them: its Inspector has a Basics tab for what most games touch and an Advanced tab whose sections start collapsed. The Inspector uses plainer labels than the field names below, which are the names used in code; the In the Inspector column gives both. The Setup Wizard edits the Basics.

Group Setting Default In the Inspector What it does
Start-up Initialise Automatically on Basics: Start Shipready by itself Starts Shipready by itself before the first scene loads. Off: call SaveKit.Initialise() yourself. See Starting Shipready.
Files Save Folder Name Saves Basics: Save folder Folder inside the persistent data path
Profile Folder empty Advanced, File names: Profile folder Folder inside the save folder, to keep players apart on one PC. {profile} in it is replaced by SaveKit.ProfileId; anything else is used exactly as written. See Profile folders.
Slot File Name Format slot_{0:00} Basics: Slot file names See File names
Global File Name Base global Advanced, File names: Shared file name
Autosave File Name Format autosave_{0} Advanced, File names: Autosave file names
Quicksave File Name Base quicksave Advanced, File names: Quicksave file name
File Options Basics: File extension; the rest under Advanced, Packing, encryption and backups How the slots, the autosaves and the quicksave are written. See File options.
Use Slot Options For Global File on Advanced, Packing: Shared file: Write it differently (the opposite) The global file is written with File Options too. Off: it uses Global File Options.
Global File Options as File Options, with no extension Advanced, Packing: under Shared file The global file's own options, used while Use Slot Options For Global File is off. See The global file's own options.
Slots Slot Count 10 Basics: Save slots Manual slots, 1 to 99
Autosave File Count 3 Basics: Autosave files Autosave files to rotate through, 1 to 10
Quicksave Enabled off Basics: Quicksave slot
Autosave triggers Autosave On Timer off Basics: Every few minutes
Autosave Interval Seconds 300 Basics: Every (seconds) Minimum 5
Autosave On Scene Change off Basics: When a scene loads
Autosave On Quit on Basics: When the game quits
Capture Autosave Thumbnails on Basics: Take a picture Autosaves and quicksaves render a thumbnail from the main camera, see Thumbnails
Game updates Save Version 1 Advanced, Game updates: Save version See Save versions
Auto Discover Migrations on Advanced, Game updates: Find migration steps by itself Finds [SaveMigration] methods when Shipready starts
Categories Categories five, see Categories Advanced: Categories
Default Category Progress Advanced, Categories: Values saved from code go in
World World Category World Advanced, Categories: Saveable objects go in
World Load Mode Load Saved Scenes Advanced, World objects: When a save is loaded See Load modes
Prefab Registry, Asset Registry, Scene Registry created with the settings Advanced, World objects: List of spawned prefabs, List of saved assets, List of scenes See The registries
Diagnostics Log Level Warnings Basics: Console messages See Logging and reports
Report To Console off Basics: Log each save Prints a one-line report of every save and load to the Console, at the Warnings and Verbose log levels

Shipready reads the asset and never writes to it at runtime. To change a value in code for one run, switch Initialise Automatically off, change a copy (Instantiate(asset)) and pass it to SaveKit.Initialise(settings).


Saving plain values #

More on this topic is in the Guide.

What can be saved #

Kind Types
Numbers int, long, float, double, decimal, short, byte, sbyte, ushort, uint, ulong
Text and flags string, char, bool
Time and ids DateTime (stored as UTC), TimeSpan, Guid, byte[]
Enums Any enum, stored by name, so reordering or inserting values never breaks a save
Unity values Vector2, Vector3, Vector4, Vector2Int, Vector3Int, Quaternion, Color, Color32, Rect, RectInt, Bounds, BoundsInt
Collections List<T> and T[] of any of the above, or of your own classes
Your own classes and structs Marked [Serializable], saved under Unity's own rules through JsonUtility. If the Inspector shows a value, Shipready can save it.
Dictionaries Dictionary<string, T> and Dictionary<int, T>, where T is any type above (see Dictionaries)
using System;
using System.Collections.Generic;
using RareGeometry.Shipready.Save;
using UnityEngine;

public enum Difficulty { Easy, Normal, Hard }

[Serializable]
public class GraphicsOptions
{
    public int quality = 2;
    public bool vsync = true;
}

public class SaveTypesExample : MonoBehaviour
{
    public void Store(GraphicsOptions options)
    {
        SaveKit.Data.Set("difficulty", Difficulty.Hard, "Settings");              // stored as "Hard"
        SaveKit.Data.Set("unlocked", new List<string> { "Forest", "Caves" }, "Progress");
        SaveKit.Data.Set("lastCheckpoint", new Vector3(12f, 0f, -4f), "Progress");
        SaveKit.Data.Set("firstPlayed", DateTime.UtcNow, "Progress");
        SaveKit.Data.Set("graphics", options, "Settings");                         // through JsonUtility
    }

    public void ReadBack()
    {
        Difficulty difficulty = SaveKit.Data.Get("difficulty", Difficulty.Normal, "Settings");
        List<string> unlocked = SaveKit.Data.Get("unlocked", new List<string>(), "Progress");
        Vector3 checkpoint = SaveKit.Data.Get("lastCheckpoint", Vector3.zero, "Progress");
        DateTime firstPlayed = SaveKit.Data.Get("firstPlayed", DateTime.UtcNow, "Progress").ToLocalTime();
        GraphicsOptions graphics = SaveKit.Data.Get("graphics", new GraphicsOptions(), "Settings");
        Debug.Log(difficulty + " " + unlocked.Count + " " + checkpoint + " " + firstPlayed + " " + graphics.quality);
    }
}

Good to know:

  • Enums by name. An enum value that no longer exists, because you removed or renamed it, reads back as the fallback instead of failing the load.
  • Dates are stored as UTC. A DateTime comes back with Kind set to Utc, as the same moment in time. Call .ToLocalTime() before you show it to a player. A date whose Kind is Unspecified is treated as local time when it is saved.
  • Numbers are exact. Floats and doubles read back bit for bit, including NaN, infinity and negative zero. A readable file shows the shortest text that reads back as exactly the same number, so 0.8f is written as 0.8. A few values need more digits: up to nine for a float and seventeen for a double.
  • Numbers look the same in every language. Shipready writes numbers in one fixed format, whatever the player's language settings, so a save made on a German PC loads on an English one.
  • Your own classes follow Unity's rules: public fields and [SerializeField] fields of supported types are saved; properties, interfaces and dictionary fields inside the class are not.

Dictionaries #

A Dictionary<string, T> or a Dictionary<int, T> is saved like any other value, as long as T is a type Shipready can save:

var kills = new Dictionary<string, int> { { "slime", 12 }, { "bat", 3 } };
SaveKit.Data.Set("kills", kills, "Progress");

Dictionary<string, int> loaded = SaveKit.Data.Get("kills", new Dictionary<string, int>(), "Progress");
  • Get builds a new dictionary from the save each time. When nothing is saved under the key, it returns your fallback.
  • In the file, a dictionary is a JSON object. int keys are written as text, such as "12".
  • A dictionary with other keys, such as an enum, or with values Shipready cannot save, is not saved. The Console warns once with InvalidArgument (SK002), and Get returns your fallback. Save such data as two lists instead, or from an ISaveable.
  • A category's writer and reader do the same: SaveKit.Data.Writer("Progress").WriteDictionary("kills", kills) writes it, and SaveKit.Data.Reader("Progress").ReadDictionary<int>("kills") reads it back, or null when there is none. Read int keys back with ReadIntDictionary<TValue>. Writer(category) and Reader(category) also offer WriteList, ReadList, WriteObject and ReadObject, for code that prefers to write a group of values at once.
  • A dictionary field of a script cannot be ticked in the Field Picker, because Unity does not save dictionary fields. Save it from an ISaveable (see Custom scripts).

Saving and loading #

More on this topic is in the Guide.

Save Actions, Save Events and Save Point #

Component Settings Notes
Save Actions Continue Scene, New Game Scene, Delete All Includes Settings, On Succeeded, On Failed (with the reason) Methods for UnityEvents: SaveToSlot(int), LoadSlot(int), Quicksave(), Quickload(), Autosave(), Continue(), NewGame(), DeleteSlot(int), DeleteAllSaves(). Saves and loads run in the background; deletes are immediate. Running counts the actions still working
Save Events (SaveEventListener) Slots, Autosaves, Quicksave (on), Global File (off); seven UnityEvents Listens while enabled. A file of no known kind counts as a slot when the event names a slot number
Save Point Target (Autosave, Slot or Quicksave), Slot, Player Tag (Player; empty is anything), Save On Enter, Cooldown Seconds (10), Only Once, Location Name, On Saved, On Failed Works with 3D and 2D trigger colliders. SaveNow() saves when CanSaveNow: not used up, not cooling down, not already saving, and SaveKit.CanSave. The cooldown uses real time

Threads and the file queue #

  • Capturing and restoring run on the main thread, because Unity's APIs require it.
  • Reading the old file, migrating, merging, serialising, compressing, encrypting and writing run on a background thread for the Async calls and for SaveInBackground and LoadInBackground. The blocking calls do the same work on the calling thread. Profiler markers show which thread each stage ran on.
  • Work for one file runs one item at a time, in the order it was asked for. Two saves fired in a row both finish, and the file holds the second one.

Slots and slot info #

More on this topic is in the Guide.

What a slot records #

Each save records slot info that the menu reads without unpacking the game data:

SlotInfo member What it is
SlotNumber The slot, counting from 1; 0 for an autosave or the quicksave
FileName, Exists The file, and whether there is a save in it
Name SaveKit.SlotName at the time of the save, or Slot N when the game set none
SavedUtc When it was saved, in UTC (use ToLocalTime() to show it)
PlaytimeSeconds Playtime at the time of the save
Location SaveKit.Location at the time of the save
Summary Up to four short lines, such as "Day 12" and "$4,300". The menu shows the first two.
GameVersion, SaveVersion The game's version (Application.version) and save version
ThumbnailFileName The thumbnail file, or empty
BackupCount, FileBytes, Packing Backups on disk, file size, and how the file is packed
IsDamaged, HasValidBackup, RecoveredFromBackup The main file is damaged; a backup can stand in; these details come from a backup copy
IsFromNewerVersion Saved by a newer version of the game, so it cannot be loaded
IsAutosave, IsQuicksave, Status What kind of save it is, and the code from reading it

Set the name, location and summary before you save:

SaveKit.SlotName = "Chapter 3";
SaveKit.Location = "Downtown";
SaveKit.SetSummary("Day 12", "$4,300");

These are kept between saves, and a load sets them from the file. A default name such as Slot 3 is not carried over, so saving that game into slot 5 records Slot 5.

Playtime is counted by Shipready while it runs, in unscaled time. SaveKit.Playtime gives the total in Seconds; set IsPaused to stop the clock during menus or cutscenes. A load sets the clock from the save, and NewGame starts it from zero. PlaytimeTracker.Format(seconds) turns a number of seconds into short text such as 2h 15m.

World persistence #

More on this topic is in the Guide.

Parents #

The Position saver records the parent when the parent is a saved object or the scene root, and restores it in the second pass, once every object exists.

  • A scene object under a parent that is not saved keeps the parent it has in the scene.
  • A runtime object under a parent that is not saved, such as a plain "Enemies" container, records that parent's path in the scene and its world pose, so it comes back in the same place. The path assumes sibling names are unique and contain no /. If the parent cannot be found, the object goes to the scene root at the same world position.

Load modes #

World Load Mode in the settings decides how a load treats scenes. SaveKit.World.LoadMode changes it at runtime.

Mode LoadAsync Load (blocking)
Load Saved Scenes (default) Loads the scenes the save was made in, restores each as it loads, sets the active scene, then fires Loaded Restores into the scenes that are loaded now
Restore Into Current Scenes Restores into the scenes that are loaded now Restores into the scenes that are loaded now

When restoring into the scenes that are loaded now, the state of any other saved scene stays in memory and is applied when that scene loads. A file that holds no world data leaves the scenes alone.

Restoring into an open scene cannot bring back a scene object that was destroyed after the save, because Shipready has no prefab to make it from: it is skipped with an ObjectNotFound warning. Load Saved Scenes mode reloads the scenes, so everything comes back.

Scene loader hook. For a loading screen, or scenes that are not in Build Settings, set SaveKit.World.SceneLoader to your own ISceneLoader (namespace RareGeometry.Shipready.Save.World). Return the AsyncOperation of a SceneManager load and leave allowSceneActivation on:

using RareGeometry.Shipready.Save.World;
using UnityEngine;
using UnityEngine.SceneManagement;

public sealed class LoadingScreenSceneLoader : ISceneLoader
{
    public AsyncOperation LoadScene(string scenePath, string sceneName, LoadSceneMode mode)
    {
        // Show your loading screen here.
        string scene = string.IsNullOrEmpty(scenePath) ? sceneName : scenePath;
        return SceneManager.LoadSceneAsync(scene, mode);
    }
}

Return null for a scene you cannot load. Games that load scenes through Addressables load them themselves and use Restore Into Current Scenes, or call SaveKit.World.ApplyScene(scene) once each scene is in.

Component savers #

The Animator, Audio Source, Enabled and NavMesh Agent savers are components beside a Saveable, saved in its entry under their own name like any ISaveable (see World data in the file). Each compiles only when its Unity module is switched on in the Package Manager (Animation, Audio, AI); the Enabled saver always does.

Component Stored members Notes
Animator Saver parameters (one member per float, int or bool parameter), stateHashes, stateTimes, layerWeights Save Parameters and Save States switch the two halves. A state that no longer exists after a game update is left to the controller. The state is played with Animator.Play at the saved normalized time once the Animator is initialised
Audio Source Saver playing, time, volume, pitch Save Playback and Save Volume And Pitch switch the two halves. A time past the clip's end is clamped
Enabled Saver enabled, a list of true or false in the order of Targets Behaviours, Renderers and Colliders; anything else in the list is skipped
NavMesh Agent Saver position, speed, stopped, hasDestination, destination Applied on the agent's next frame with Warp, then SetDestination and isStopped when it is on a NavMesh

State a load hands over before the component can take it is kept, and saved again unchanged if the game saves first; HasPendingRestore says whether it is waiting.

Physics #

Every body whose position a restore puts back is held kinematic for at least one simulated physics step, then released with its saved velocities and sleep state (or with its own settings when the Physics saver is off). Objects that are restored touching each other, such as stacked crates, therefore start from rest instead of bursting apart.

The release happens in FixedUpdate. If Physics.simulationMode is set to Update or Script, the release may not line up with your simulation step.

DontDestroyOnLoad objects #

Saveables under DontDestroyOnLoad, such as a game manager, are saved in a separate persistent section of their category, not with any scene. A load restores them first, before the scenes. Their destruction is not recorded by the Destroyed saver.

World data in the file #

A readable save, shortened, with ids cut short for space:

{
  "aiosk": 1,
  "header": {
    "saveVersion": 1,
    "gameVersion": "0.9.2",
    "kitVersion": "1.0.0",
    "savedUtc": "2026-11-02T18:41:07Z",
    "checksum": "crc32:5F1A9C02",
    "packing": "readable"
  },
  "info": {
    "name": "Slot 1",
    "playtimeSeconds": 8123,
    "location": "Downtown",
    "gameVersion": "0.9.2",
    "summary": ["Day 12", "$4,300"]
  },
  "data": {
    "Progress": { "gold": 4300, "day": 12 },
    "World": {
      "scenes": {
        "4f2a9c…": {
          "label": "Assets/Levels/Town.unity",
          "objects": {
            "8c1f…": {
              "name": "Chest_03",
              "Position": { "p": [12, 0, -4], "r": [0, 0, 0, 1], "s": [1, 1, 1], "parent": "" },
              "Active": true,
              "fields": { "ChestLid.isOpen": true, "Health.current": 50, "ChestLid.door": { "obj": "5e7a…", "t": "Door" } },
              "custom": { "Chest": { "open": true, "contents": ["a1b2…"] } }
            }
          },
          "destroyed": ["77de…"],
          "spawned": [
            {
              "prefab": "e5c0…",
              "id": "0b9d…",
              "parent": "",
              "state": { "name": "Crate(Clone)", "Position": { "p": [3, 1, 0], "r": [0, 0, 0, 1], "s": [1, 1, 1], "parent": "" } }
            }
          ]
        }
      },
      "loadedScenes": ["4f2a9c…"],
      "activeScene": "4f2a9c…"
    },
    "players": {
      "76561198000000000": { "Progress": { "position": [4, 0, 2] }, "Inventory": { "items": [3, 1] } }
    }
  }
}
  • Each scene section has a label (the scene path, for people reading the file), objects (scene objects by id), destroyed and spawned (runtime objects with their prefab id, parent and state; saved children of a prefab are under children).
  • An object entry holds name, then whatever its savers write: Position (p, r, s and parent), Active, Physics, fields with keys <ComponentType>.<field>, and custom with one entry per ISaveable script, keyed by class name.
  • Links from ticked fields and from WriteObjectLink are { "obj": "<id>" } for a GameObject, { "obj": "<id>", "t": "<component type>" } for a component (plus "c" when it is not the first component of that type on its object, see References), and { "asset": "<asset id>" } for an asset. WriteAsset and WriteAssets store the asset id as plain text, as in contents above.
  • DontDestroyOnLoad objects are in the category's persistent section. In co-op, per-player data is in a players section beside the categories, as players.<player id>.<category>; a game without co-op has no players section.

The Save Inspector shows this tree with readable names, and lets you search it.

The registries #

Three registry assets, created by the wizard and linked from the settings asset, let Shipready find things again:

Registry Lists Kept up to date
Prefab Registry Prefabs with a Saveable on the root, by asset GUID Automatically: prefabs are checked whenever Unity imports them, and deleted ones leave the registry
Scene Registry Scenes, by asset GUID, with their path Automatically: every scene in Build Settings is listed, and moving or renaming a listed scene updates its path
Asset Registry Assets a save may link to, such as item definitions By you: Diagnostics registers assets linked from ticked fields in one click, and Register Selected Assets registers the assets you select; deleted assets leave the registry automatically

Upkeep works only while the project has a settings asset that points at the registries. Tools → Shipready → Saves → Registries → Rebuild Registries checks every prefab and scene from scratch.

A scene that is in neither Build Settings nor the Scene Registry is saved under its path instead, with a one-time SceneNotRegistered warning (SK133); moving or renaming it would then lose its saved state.

Registering assets you write from ISaveable. Diagnostics only sees assets linked from ticked fields. For assets your own scripts write with WriteAsset, WriteAssets or WriteObjectLink, select them in the Project window and choose Tools → Shipready → Saves → Registries → Register Selected Assets. It adds the selected ScriptableObjects and prefabs to the settings asset's Asset Registry in one Undo step, skips anything else, such as folders, scenes and Shipready's own settings and registries, and says in the Console how many it added. The command is greyed out while nothing that can be registered is selected.

For many assets of one type, a small editor script, saved in a folder called Editor, can register them all at once:

// Editor/RegisterItemDefinitions.cs
using RareGeometry.Shipready.Save.Editor.Registries;
using RareGeometry.Shipready.Save.Settings;
using UnityEditor;

public static class RegisterItemDefinitions
{
    [MenuItem("Tools/My Game/Register Item Definitions")]
    static void Register()
    {
        SaveKitSettings settings = RegistryUpkeep.FindSettings();
        if (settings == null || settings.AssetRegistry == null) return;

        foreach (string guid in AssetDatabase.FindAssets("t:ItemDefinition"))
        {
            var item = AssetDatabase.LoadAssetAtPath<ItemDefinition>(AssetDatabase.GUIDToAssetPath(guid));
            if (item != null) RegistryUpkeep.RegisterAsset(settings.AssetRegistry, item);
        }
    }
}

Reliability and recovery #

The promise: at every moment during a save, at least one complete, valid copy of it is on disk, and nothing Shipready does throws into your game.

Crash-safe writes #

Every save follows the same steps:

  1. Capture the values on the main thread.
  2. Serialise, compress and encrypt (when switched on).
  3. Write slot_01.save.tmp, flush it to the disk, read it back and check it.
  4. Swap it into place with the operating system's atomic replace, then rotate the backups.
  5. Write the thumbnail and the slot cache, then report.

The old save stays intact until the new one is proven good. Anything that goes wrong before the swap leaves every file as it was. A problem tidying the backups after the swap is a warning on a successful save, never a failed one.

Checksums #

Every file carries a CRC-32 checksum of its data, checked on every load. A readable file whose data no longer matches its checksum counts as damaged (see Edited saves for the exceptions). An encrypted file also carries a tamper check (see Encryption).

Rotating backups #

Each save keeps File Options → Backup Count older copies, 2 by default, adjustable from 0 to 5: .bak1 is the newest, .bak2 the one before. A load tries the main file first, then a complete .tmp, then .bak1, .bak2 and so on, and the first valid copy wins. Only damage makes a load move on; a locked file or a missing drive reports itself instead.

Automatic fallback #

File Options → Automatic Fallback is on by default.

  • On: a damaged slot, autosave or quicksave loads from its newest valid backup. The result is a success with the code RecoveredFromBackup (SK102), LoadedFrom and SavedUtc say which copy was used, and the RecoveredFromBackup event fires.
  • Off: loading a damaged save fails with its damage code and moves nothing. The slot info reports IsDamaged and HasValidBackup, and the menu offers Restore backup, which calls SaveKit.RestoreBackup.
  • The global file always falls back, whatever this setting says.
  • Saving over a damaged slot works either way. The save keeps the categories it does not write from the newest valid copy.

With fallback off, a crash during the very first save of a slot leaves only the .tmp file. The slot then reports SK101, and Restore backup puts the .tmp file in place.

Damaged files are kept #

When a load falls back, the damaged main file is renamed .corrupt-<time> and kept for support, never deleted. A file with no valid copy at all gives a clean FileDamaged result (SK101); the game keeps running and nothing is deleted.

Disk full and access denied #

If the disk is full or the folder cannot be written, the save fails with DiskFull (SK110) or AccessDenied (SK111), and every existing save stays byte-for-byte as it was. A save tree nested deeper than 128 levels is refused before anything is written, because it could never be read back.

What the player sees #

In the save menu, a damaged slot shows a Damaged badge. Loading it with fallback on shows "Restored from backup (date)". With fallback off, the card shows a Restore backup button. A slot whose details come from a backup copy shows a Restored badge. See The save and load menu.


File options #

File Options in the settings asset decides how the slots, the autosaves and the quicksave are written. The global file is written the same way, unless you give it options of its own (see The global file's own options).

Setting Default What it does
Pretty Print Automatic Indents readable files. Automatic: indented in the Editor and in development builds, compact in release builds. Always or Never force it.
Compress off GZip-compresses the data
Encrypt off Encrypts the data, with a tamper check
Encrypt Slot Info off Encrypts the slot info too. Off, the menu reads names, dates and summaries without decrypting anything.
Passphrase change-me-before-you-ship The secret the keys are made from. Switching Encrypt on (Advanced tab) generates a random one; Generate makes another.
Key Salt random, set when the file options are first applied Mixed into the keys, so two games with the same passphrase get different keys. Empty uses a fixed salt made from the product name.
Key Iterations 100000 How many times the passphrase is stretched into a key. Values below 1000 use 100000.
Backup Count 2 Rotating backups per file, 0 to 5
Checksum Policy Treat Edits As Damaged What to do with a readable file edited by hand
File Extension .save The extension of the save files. Backups, temporary files and damaged copies add their own endings after it.
Automatic Fallback on See Reliability and recovery

Readable JSON and pretty printing #

Saves are readable JSON by default: any text editor opens them, and they are easy to support. With Pretty Print on Automatic, files are indented while you develop and compact in a release build, which is the compact mode for shipping. Whitespace never changes the checksum.

Compression #

GZip makes large saves several times smaller. It is off by default because typical saves are small. Compressed files can no longer be read in a text editor; the Save Inspector still opens them.

Encryption #

Encryption stops players editing saves in a text editor, and its tamper check notices edits.

  • How it works: AES-256 in CBC mode with a random IV for every write, and an HMAC-SHA256 over the header and the encrypted data (encrypt-then-MAC). The keys are derived once, when Shipready starts, from Passphrase, Key Salt and Key Iterations with PBKDF2 (SHA-256).
  • A changed byte fails the tamper check (TamperDetected, SK105) and the backup loads. A file written with another passphrase gives EncryptionKeyWrong (SK106).
  • Its limits: the key ships inside your game, so a determined player can dig it out, especially from Mono builds, which are easy to decompile. It is not anti-cheat, and it must never protect passwords, payment details or other personal data. In co-op, the host's save is the authority anyway.
  • Set your own passphrase before release. Diagnostics warns while the default one is set and either the slots or the global file are encrypted. After release, never change Passphrase, Key Salt or Key Iterations, or existing encrypted saves can no longer be opened.
  • Thumbnails are never encrypted.

LimitsAndFAQ.md explains the limits of encryption in more detail.

How the options combine #

Data is compressed first, then encrypted, because encrypted data cannot be compressed. A compressed or encrypted file uses a binary envelope: a short marker, a readable header, then the packed data. The loader tells readable and packed files apart from their first bytes, and the header records which options were used, so any mix loads correctly.

Changing options in an update #

Each file records how it was written, and the loader follows the file, not the settings. You can switch compression or encryption on or off in a game update and old files still load; they are written the new way the next time they are saved. The same goes for giving the global file its own options, or taking them away again (see below). The one thing you must not change after release is the passphrase, salt or iteration count. See GameUpdates.md.

Edited saves: the checksum policy #

A readable save edited by hand no longer matches its checksum.

  • Treat Edits As Damaged (default): in a build, the file counts as damaged and the newest backup loads instead (ChecksumMismatch, SK104). This also catches files that were cut short.
  • Accept With Warning: the file loads, with a warning in the report. Use this for moddable games.
  • The Editor always accepts edited files, with a warning, so you can tweak saves while you test.

The global file's own options #

The global file holds the player's settings. By default it is written with File Options, like the slots. To give it options of its own, tick Write it differently under Shared file on the settings asset's Advanced tab (in code, untick Use Slot Options For Global File) and fill in Global File Options, or tick Different options for the settings file in the wizard's File options step.

  • Global File Options has the same fields as File Options. The global file then uses its own Pretty Print, Compress, Encrypt, Encrypt Slot Info, Backup Count, Checksum Policy and File Extension.
  • Passphrase, Key Salt and Key Iterations always come from File Options, so every file of your game shares one key. The ones in Global File Options are never used.
  • Automatic Fallback makes no difference: the global file always falls back to its newest good backup.
  • An empty File Extension, the default, keeps the slots' extension. Another extension, such as .local, gives the global file its own name, global.local, and its working copies follow it: global.local.tmp, global.local.bak1 and so on. This is how you keep machine-specific settings, such as graphics quality, out of a Steam Cloud pattern of *.save (see SteamCloud.md).
  • An extension Shipready cannot use stops it starting with SettingsInvalid (SK153). It needs a dot followed by a few letters, and it cannot be .tmp or start with .bak or .corrupt, which Shipready uses for its own copies.
  • Switching after release is safe. When a game update gives the global file its own extension, or takes it away again by going back to the slots' options, Shipready looks for the file under both names and loads whichever was written last, so the player keeps their latest settings. The next save writes the new name, and the old file is left where it is. Only those two names are looked at: changing the global file's own extension from one value to another, such as from .local to .cfg, leaves the settings under the old name behind.
  • The Save Inspector lists the global file under its own extension too.

Shipready reads these options when it starts.


The save and load menu #

More on this topic is in the Guide.

Modes and cards #

  • Save mode lists the manual slots.
  • Load mode lists the autosaves (newest first), the quicksave when it is switched on and exists, then the manual slots that hold a save, then the empty ones. Empty slots are dimmed, show "Empty" and cannot be loaded.

Each card shows the thumbnail (or "No preview"), the name, the local date and time, the playtime, the location, the first two summary lines, and badges:

Badge Means
Autosave / Quicksave The card is an autosave or the quicksave
Damaged The main file is damaged
Restored The card's details come from a backup copy
From a newer version Saved by a newer version of the game; it cannot be loaded

Actions and confirmations #

Action What happens
Save to an empty slot Saves straight away
Save over a used slot Asks "Overwrite …?" first. A damaged or newer-version slot gets its own warning.
Load Asks "Load …? Unsaved progress will be lost." first, unless Ask before loading is off
Load a damaged slot (fallback on) Loads the newest good backup; the status line says "Restored from backup (date)" and the menu stays open so the player can read it
Restore backup (fallback off) Puts the newest good backup back; asks first only when Ask before restoring a backup is on
Delete Asks "Delete …? This cannot be undone." first
Save, with Players can name their saves on Asks for a name in the same question (and "Overwrite …?" over a used slot); Enter saves. The name becomes SaveKit.SlotName
Rename (Save mode, Players can name their saves on) Asks for the new name; the save time stays
Copy (Save mode, Players can copy a save on) Copies the save into the first empty slot, with its picture; says so when every slot is used

While a save, load or restore runs, the Back button is disabled, and closing waits for it to finish so the result line is never lost.

On the SaveMenu component:

Setting Default What it does
Theme, Words the default assets The look and the words
Ask before loading (ConfirmLoad) on Ask before loading
Ask before restoring a backup (ConfirmRestore) off Ask before Restore backup
List autosaves in the Load menu (ShowAutosavesInLoadMode) on The player can load an autosave from the Load menu
List the quicksave in the Load menu (ShowQuicksaveInLoadMode) on The player can load the quicksave from the Load menu
Take a picture for each save (CaptureThumbnail) on Take a thumbnail just before the Save menu shows
Camera for the picture (empty: main camera) (ThumbnailCamera) empty (Camera.main)
Pause the game while open (PauseTimeWhileOpen) off Sets Time.timeScale to 0 while open and puts it back on close
Close after loading (CloseAfterLoad) on A load that used a backup keeps the menu open
Close after saving (CloseAfterSave) off
Back key (CloseKey) Escape The key that backs out of a question or the menu; None for no key
The gamepad's back button backs out too (CloseWithGamepad) on Whether the gamepad's East button (B, Circle) backs out too
Players can name their saves (PlayerNamedSaves) off Ask for a name when saving, and show Rename on saved slots
Players can copy a save (AllowCopy) off Show Copy on saved slots in the Save menu
Your own question box (Confirmation) empty A component implementing ISaveMenuConfirmation, used instead of the menu's own dialog. When it also implements ISaveMenuNamePrompt, names are asked through it too
Events empty On Opened, On Closed, On Selection Moved, On Question Asked, On Saved, On Loaded, On Deleted, On Restored, On Failed (UnityEvents, for sounds and effects)

The menu raises Opened, Closed, SaveFinished, LoadFinished, DeleteFinished and RestoreFinished, and exposes IsOpen, IsBusy, Mode, Cards, StatusMessage, Tab (with SetTab) and TabsShown. In Load Saved Scenes mode a load replaces the loaded scenes, so keep the menu in a scene that stays loaded, or under DontDestroyOnLoad, if you need LoadFinished.

The menu's look and layout #

The look lives on a Menu Theme asset: every colour, the TextMesh Pro font (empty uses TMP's default), seven font sizes, Corner Radius (0 to 48), Selection Outline (1 to 8) and Card Spacing (0 to 64). Its Layout block (MenuTheme.Layout, a MenuLayout) arranges the menu without any prefab edit:

Setting Default What it does
Columns 1 1 is the list; 2 to 4 is a grid of tiles with the picture on top and the buttons at the bottom
Card Height 184 A list card's height, 140 to 320. Grid tiles size themselves
Show Thumbnail, Show Date, Show Playtime, Show Location, Show Summary, Show Badges on Which details a card shows. A hidden row leaves no gap; "Empty" on an empty slot always shows
Placement Centre The panel in the centre, or against the left or right edge (56 pixels in)
Width 1440 The panel's width, 900 to 1800. A list uses at least 1200
Show Title on The title, the line under it and the accent bar
Dim Background on Off leaves the game in full view; the clear backdrop still takes the clicks
Show Status on The status line under the list
Show Tabs off The Load menu's All, Saves and Autosaves tabs, when autosaves or the quicksave are listed. The list moves down 64 pixels to make room
Newest First off Saves listed by save time, newest at the top, in both modes; empty slots follow in slot order
Fade In Seconds 0 How long the menu fades in as it opens, 0 to 1
Button Fade Seconds 0.08 How long a button takes to change colour, 0 to 1

The defaults are the menu's original look. SlotListLayout, on the list's content, lays one column out exactly as a vertical layout group did, and a grid with equal tiles per row; in a grid, left and right move along a row and down goes from a tile into its buttons, then to the tile below. With the default layout, a prefab variant of the menu or the card keeps its own panel, title and card arrangement; a changed layout arranges them as described above. A card or menu that does not name its layout areas always keeps its own arrangement.

One part can differ from its theme: its Themed Element has Override Colour and Override Font Size. Assets → Create → Shipready → Menu Theme from a Style starts a new theme from any ready-made one. Six ready-made themes are in UI/Settings/Styles: Dark (the default), Light, Fantasy, Sci-fi, Cozy and Minimal. The Menu Style window edits all of this.

Controls #

  • Mouse and touch work through uGUI pointer events. Buttons are at least 64 pixels tall at the 1920×1080 reference resolution.
  • Keyboard and gamepad work through uGUI navigation, with the old Input Manager, the Input System, or both: arrow keys or the d-pad move between cards and their buttons, Submit presses, Cancel (Escape, or East/B on a gamepad) closes the open confirmation, or else the menu.
  • Something is always selected while the menu is open, and the list scrolls to keep the selected card in view, also with 99 slots.
  • Closing the menu gives the selection back to whatever was selected before it opened, such as your pause menu's Save button.

Test hotkeys. The SaveMenuHotkeys component, which the Start window and the wizard add with the menu, opens the Save menu with F5 and the Load menu with F9; the same key again closes it. Active In says where the keys work: Editor Only (the default: while you test in Play Mode, never in a built game), Editor And Builds, or Off. Change the keys with Save Key and Load Key, or set one to None. It works with both input systems.

The Game Menu #

GameMenu.prefab in UI/Prefabs. Its own canvas sits under the save menu's (sort order 90 to the menu's 100), so Save Game and Load Game open over it.

Setting Default What it does
Theme, Text the default assets The same look and words as the save menu
Where the buttons sit (Placement) Centre The panel in the centre, or 96 pixels in from the left or right edge
Show Continue, Show New Game, Show Load Game, Show Quit on Which buttons show
Show Save Game, Show Reset Progress off Save Game opens the save menu to save; Delete All Saves deletes every save after asking
Save Menu empty The save menu Save Game and Load Game open
Open On Start on Off for a pause menu
Toggle Key None A key that opens and closes it, such as Escape for a pause menu. Ignored while the save menu or a question is open
Close When Playing on Hide it once Continue, New Game or a load from the save menu has started the game
Title, line under it the game's name; none The words are Menu Text's Game Menu Title (empty: Application.productName) and Game Menu Subtitle (empty: none); the theme's Layout switches each off
Continue Scene, New Game Scene, Quit Scene empty Scenes to load first, for New Game, and for Quit (empty quits the game, or stops Play Mode in the Editor)
Ask Before Quitting, Ask Before New Game on Ask "without saving?" when SaveKit.HasUnsavedProgress is true
Reset Includes Settings off Whether Delete All Saves takes the global file too
Events empty On Opened, On Closed, On Continued, On New Game, On Reset, On Quitting, On Failed

Open(), Close(), Toggle() and Refresh() (which greys Continue in or out) are public, as are Continue(), NewGame(), SaveGame(), LoadGame(), ResetProgress() and Quit() for your own buttons.

The saving indicator #

SavingIndicator.prefab in UI/Prefabs: its own canvas at sort order 200, which never takes a click.

Setting Default What it does
Theme, Text the default assets Box colour (Dialog), words colour (Dialog Text), each state's icon and colour, font and corner roundness; the full words are in Menu Text, Saving indicator, the short ones in Short words
Display as the theme's (icon and short text) Full text, short text, icon, icon in its colour, icon and short text, or none
Position the theme's (bottom right, 40 in) Six places on the screen's edges or Custom (anchor plus offset), with a margin; it glides to a new place
Spin the icon while saving on Turn the ring while the save runs
Show it for autosaves (Autosaves), Show it for the quicksave (Quicksave), Show it for numbered slots (Slots) on Which saves show it
Show it for the player's settings (GlobalFile) off Saving the player's settings (the global file) shows it
Show "Saving..." for at least (MinimumSeconds) 1 The least time "Saving..." shows
Show "Saved" for (SavedSeconds) 1 How long "Saved" shows; 0 goes straight to fading
Say when a save fails on "Save failed" when a save did not work
Time to fade in and out (FadeSeconds) 0.25 Fade in and out; 0 is at once
Keep it when a new scene loads on DontDestroyOnLoad when it is a root object

Times are real time, so it works while the game is paused. A save that never reports back is given up after 30 seconds. One indicator is kept across scene loads: a scene that holds another adds no second one. Corner, ShowWords and ShowIcon still work from code: setting one gives the indicator its own position or display. An indicator set up with another corner, margin or with words or icon off keeps that look after updating, and a Menu Text whose Saving indicator words were changed keeps them as its short words.

Every screen and the safe area #

The menu prefabs scale with the Canvas Scaler's Expand mode at a 1920×1080 reference: the whole design always fits, on 720p to 4K, 21:9 ultrawide, 4:3 and phones held upright, with more room around it on wider or taller screens. Each panel (the save menu's, the Game Menu's, the indicator's and the notes' boxes) sits under a Safe Area Panel object, which shrinks to Screen.safeArea: clear of a phone's notch, rounded corners and home bar, and of a TV's overscan. The dim backdrops still cover the whole screen. Phones held upright. Each kit canvas also has an Orientation Scaler, which picks the reference size when the screen's shape changes (a phone turning), with no per-frame cost. With the theme's Layout > Portrait on Auto (the default), a screen taller than wide gets a phone layout drawn 760 units wide: on a 1080-pixel-wide phone, body text is about 31 pixels and buttons about 90 (a comfortable touch target); the save menu fills the safe width less 16 units each side, with one column of tiles; the Game Menu takes 80% of the safe width; a question is never wider than the screen. Landscape keeps the 1920×1080 layout, scaled down to fit. Custom draws the phone layout at Portrait Width (600 to 1080; smaller makes everything bigger).

On a screen with no unsafe edges nothing changes. SafeAreaPanel.Simulated = new Rect(0.04f, 0.05f, 0.92f, 0.88f); tries an inset on a desktop; null goes back to the screen's own. A world-space canvas is not fitted.

The save notes #

SaveNotes.prefab in UI/Prefabs: its own canvas at sort order 199, which never takes a click.

Setting Default What it does
Theme, Text the default assets As the indicator; the sentences are in Menu Text, Save notes
Display as the theme's (icon and short text) As the indicator
Position the theme's (top centre, 40 in) As the indicator
Note loads that worked (Loads), Note saves that came back from a backup (Restores), Note saves and loads that failed (Failures) on Which news gets a note
Note saves that worked (Saves) off A save that worked (the indicator already shows it)
Show each note for (ShowSeconds) 2.5 How long a note stays
Time to fade in and out (FadeSeconds) 0.25 Fade in and out (it grows the last few percent as it appears); 0 is at once
Keep the notes when a new scene loads on DontDestroyOnLoad when it is a root object

Loads and saves of the global file never get a note. A failure is not hidden by a "Loaded" in the same frame, nor "Restored" by the "Loaded" of the same load.

Pause menus. A pause menu that reads Escape itself should check saveMenu.ConsumedCancelThisFrame and saveMenu.IsOpen in LateUpdate, as in the example above, so one key press does not close both.

Editor tools #

Every tool is under Tools → Shipready.

The Start window #

Tools → Shipready → Saves → Start. It opens by itself once per project, the first time Shipready loads in a project without a settings asset (never in batch mode or in Play Mode). With Show this window when the project opens ticked on its Help and support page, it also opens once each time the project opens.

  • The status strip checks what a first save needs, each with a one-click fix that Edit → Undo takes back:
Check Fix
Settings found Create makes the settings asset and the three registries with the recommended defaults
Scene saved Save scene saves the open scene, asking where when it is still Untitled
Scene in Build Settings Add lists the open scene in Build Settings (once it is saved)
Hotkeys on Add puts the save menu, an EventSystem and the F5 / F9 test hotkeys in the open scene; Turn on switches hotkeys that are off back on, in the Editor only
Menu text ready Import adds TextMesh Pro's essential resources (a font and its settings) straight away; without them the menu and the demos show no text. Importing cannot be undone, and does not need to be
  • Make objects remember their state adds a Saveable to every object selected in the Hierarchy, ticking the fields that look like state. Suggest objects in this scene lists objects that look like they change during play, as the scene scan does.
  • Add a save/load menu chooses where the test hotkeys work (Editor only, Editor and builds or Off) and adds the menu to the open scene, optionally with the scene in Build Settings, and imports TextMesh Pro's essential resources when they are missing. When a demo scene is opened in a project without them, Shipready asks once per editor session whether to import them.
  • The footer opens the settings, the Setup Wizard, the Save Inspector and Diagnostics, selects the Quick Start, Guide and Troubleshooting documents in the Project window, and opens Help and support.
  • Help and support shows Shipready's version, buttons that select each document, the Discord invite, the bug tracker, Discussions, the website and the e-mail address as selectable text with Copy buttons, Copy system info (Shipready version, Unity version, render pipeline, platform) and Report a bug (see Other menu commands), and the switch Show this window when the project opens (off by default). Shipready never opens a browser or another program; every address is there to copy.
  • Save values from my scripts shows SaveKit.Data.Set, SaveKit.Data.Get, SaveKit.Save and SaveKit.Load in a few lines, with Copy the code.
  • Make it yours opens the Menu Style window. The footer's Menu Style button and the Add a save/load menu flow's Make it yours button open it too.

Tools → Shipready → Saves → Menu Style, also Make it yours in the Start window. It edits the save menu in the open scene; with none, Add the save menu to this scene adds the prefab (one Undo step). With several, a list picks one.

Tab What it does
Style Use applies one of the six styles: colours, sizes and shape. The menu's font, layout, words and message choices are kept
Messages Display as for the indicator, the notes, the status line and the badges; where the indicator and the notes sit, and the glide time; the state colours; each kind's icon and own display. The preview switches to Messages
Colours Every colour of the theme, in Surfaces, Text, Accents, Buttons and Badges, with a warning for each pair of colours that reads badly (body text below 4.5:1, labels below 3:1)
Text and shape Font, font sizes, corner roundness, selection outline, gap between cards
Layout Every setting of the menu's layout, and Back to the original layout
Words Every line of the menu's Menu Text, grouped, with what {0} means under each line and a warning when a line would show wrongly. Edits go to a draft; Save as my text keeps them, Start again drops them. Closing the window with unsaved words asks first
Share Export this style... writes the theme with its layout and the words to a .json file (a font goes by its GUID and name). Import a style... reads one into the menu's own copies; a font the project lacks is left as it is, and the window says so
  • The first change makes the game's own copy, MyMenuTheme or MyMenuText, in Menu inside your data folder (Assets/RareGeometryData/Shipready/Menu by default) and assigns it to the menu. A second menu, or the same menu after an undo, gets that same copy. Shipready's assets are never changed.
  • Each action is one Undo step. Undo after a style or an import puts the menu back on its old theme; the copy stays in your data folder and is used again next time.
  • Preview draws a copy of the menu with made-up saves in a preview scene of its own, in Save or Load mode. It never adds anything to, changes or marks as changed the open scene.

Setup Wizard #

Tools → Shipready → Saves → Setup Wizard. Running it again edits the settings that are there. Each step has Back, Skip and Apply and continue; each Apply is one Undo step.

What kind of game is it? Step 1 starts with presets. Picking one lists exactly what it would change, before anything changes; Use these settings puts the values into the step, and Apply and continue applies them as one Undo step. The settings asset's Basics tab has the same row, which applies at once as one Undo step.

Preset Sets
Story / RPG 20 slots, quicksave on, autosave on quit and when a scene loads, timer off, 3 autosave files, pictures on
Roguelike 1 slot, quicksave off, autosave on quit only, 1 autosave file, pictures off. The player does not pick slots: save and load slot 1 from code, or rely on the autosave
Arcade / mobile 1 slot, quicksave off, autosave on quit and when a scene loads, timer off, 1 autosave file, pictures off, compact (never indented) and compressed files
Custom Nothing

Presets never change encryption, the passphrase or key, the save folder or file names. Lowering the slot count warns that saves in the higher slots stay on disk but stop showing in the menu. Turning on compression is safe for saves already written: each file says how it was packed.

Step What you choose
1. Where saves go Where the settings and registries go (Kit settings folder, when the project has none yet), Save folder, Slot file names and File extension. Folded away under Slots and autosave: Save slots (1 to 99), Quicksave slot, Autosave when the game quits, Autosave every few minutes (with Seconds between autosaves), Autosave when a scene loads, Autosave files and Start Shipready by itself (on).
2. Menu and hotkeys Adds Save menu, Test hotkeys (F5 / F9) with Work in (Editor only by default) and an EventSystem to the open scene, and the scene itself to Build Settings (on when the scene is saved and not listed yet); checks for TextMesh Pro's essential resources and offers Import TMP Essentials
Finish Lists everything the wizard created or changed, with buttons to open the Start window, select the settings asset and open the Save Inspector

The first Apply creates the settings asset and the three registries in your data folder and fills the Prefab and Scene Registries. The wizard adds no code. With Start Shipready by itself on, none is needed; with it off, start Shipready as Starting Shipready in your game shows.

The settings asset's Inspector #

Select ShipreadySaveSettings to edit it. Basics holds the game presets, where saves go, slots, autosave, start-up and Console messages. Advanced holds, each in a section that starts collapsed:

  • File names and the profile folder: Profile folder (see Profile folders), Shared file name, Autosave file names, Quicksave file name.
  • Categories: rename, add or remove categories, choose In each slot or One shared file for each, and pick where values from code and Saveable objects go (those two cannot be removed). Apply the categories applies them as one Undo step; Undo my edits goes back to what the asset holds.
  • Packing, encryption and backups: Indent the text, Compress, Encrypt with Passphrase and Generate, Older copies kept, Use a good copy by itself, A save edited by hand, and under Shared file, Write it differently with its own Indent the text, Compress, Encrypt, Older copies kept and File extension (see The global file's own options). Apply the file options applies them as one Undo step.
  • Game updates: Save version and Find migration steps by itself (see Save versions).
  • World objects: When a save is loaded (see Load modes) and the three registries.
  • Scene scan: lists objects in the open scenes that look stateful: a Rigidbody, a trigger collider (pickups, checkpoints), a script with fields named like state such as isOpen or health, a script that implements ISaveable, or a renderer that starts hidden. Tick the ones to keep; each gets a Saveable with the state-like fields already ticked.

The Play Mode toast #

In the Editor, a short note at the top of the Game view says what each save or load did, for example "Saved Slot 1: 12 objects, 3 values" or "Loaded Slot 1: 11 restored, 1 skipped, Chest_02 not found (SK130). Click for details". A load of plain values only says how many values came back. A failed call names its code. Clicking the note opens the Save Inspector on that report. It is on by default; Tools → Shipready → Saves → Play Mode Toasts switches it off and on, per user. It is never added in batch mode and does not exist in builds.

Save Inspector #

Tools → Shipready → Saves → Save Inspector shows what is inside any save.

  • The list shows every save in the game's save folder, including a global file with its own extension, with a status badge (OK, Damaged, Wrong key, Missing, Unreadable, Newer version, Older version), Encrypted and Compressed badges, and a line with its backups, size, save version and local time. A damaged save with a good backup says so. Choose folder... looks at another folder, such as a copy of a player's save folder or one player's profile folder; Game's folder goes back. Refresh lists again. With {profile} in Profile Folder, the game's folder is the save folder itself until SaveKit.ProfileId is set; each player's saves are in a folder inside it, which Choose folder... opens.
  • The tree opens a save as file → category → scene → object → value. Scenes show their path and objects their saved name. A saved transform reads as one row, such as "Position (0, 0.5, 2) Rotation (0°, 90°, 0°) Scale (1, 1, 1)", and opens to the raw values; the playtime shows its clock time too. Pick a backup, the temporary file or a damaged copy from the copy menu to look at it instead of the main file. Encrypted saves open with your project's key, and edited readable saves open with a warning.
  • Search finds keys and values, ignoring case; matches stay visible and are highlighted. Expand all and Collapse all help with large saves.
  • Highlight: clicking an object row selects and pings that object when it is in an open scene.
  • Live view: in Play Mode, the Live view entry shows what a save would write right now, without writing anything. Auto refresh rebuilds it by itself, at most twice a second; Export... writes it as readable JSON.
  • Actions: Import... copies a player's save file into the folder for debugging; replacing a save that is there asks first and keeps the old one as a backup. Export readable... writes an indented, decrypted, unpacked copy. Restore backup puts the newest good backup of a damaged save back in place. Delete removes a save with its backups and thumbnail. Copy folder path copies the folder's path, to paste into Explorer's address bar. Right-click a file or a row for more, such as copying a value, a file's path or an object id.
  • Recent saves and loads lists the reports of the current Play session with the time of each (see Logging and reports).

Diagnostics #

Tools → Shipready → Saves → Diagnostics finds what would stop saves working. Choose what to check in the toolbar (Open scenes, Build Settings scenes, Prefabs) and press Run. Build Settings scenes are read one at a time without opening them. Shipready's own folders are left out. Scenes and prefabs are checked outside Play Mode only.

Check Finds One-click fix
DuplicateId Two Saveables sharing an id, in one scene or across the scenes checked Gives the copy a new id; the original keeps its own
MissingId A scene Saveable without an id Assigns an id
PrefabNotRegistered A prefab with a Saveable on its root that is not in the Prefab Registry, or carries the wrong prefab id Registers the prefab, or stamps the right id
AssetNotRegistered A ticked field linking to an asset that neither the Asset Registry nor the Prefab Registry lists Registers the asset
FieldNotSaveable A ticked field that cannot be saved, or no longer exists Unticks it
SceneNotInBuildSettings A scene with Saveables that is not in Build Settings, so a load cannot open it in a build Adds it to Build Settings
DefaultPassphrase Encryption on, for the slots or for the global file, with the default passphrase None: the message explains how to set your own
UnsupportedBuildTarget A build target other than Windows: an error for WebGL, a warning for others None
NoSettings, NoRegistries No settings asset, or a settings asset without its registries Opens the Setup Wizard
MenuTextMissing TextMesh Pro's essential resources are not in the project, so the save menu and the demos show no text Imports them

Each issue has a plain-English message, a Select button for the object it is about and, where a fix is safe, a fix button. Fix all runs every safe fix at once; it shows only when there is one. Every fix can be undone with Edit → Undo, except the import of TextMesh Pro's resources, which Fix all leaves out.

At runtime, Shipready adds its own warnings to the Console, such as a scene with Saveables that unloaded without being captured.

The Saveable inspector #

The Saveable's inspector has these parts:

  • The summary: one sentence at the top that says what it saves, such as "Saves position, active state and 2 fields: Is Open, Gold."
  • What to save: the built-in savers Position, Active state, Destroyed with When it comes back, and Movement (physics), each with a one-line explanation.
  • Values from your scripts (the Field Picker): one group per component, with a ticked count, a Ticked only filter, greyed fields with their reasons, and a list of broken ticks with Untick buttons. Select a single object to use it.
  • The Start warning: when the script's own Start method may set a ticked field, a warning says so, because Shipready restores saved values before Start runs (see Load order). It comes from a quick look through the script's text, so it says "may"; Dismiss hides it for that field in this project and Select script shows the script in the Project window.
  • Advanced: id and category, collapsed by default: the object's Id (read-only) with a New id button, which asks first because saves made so far no longer find the object (on a prefab asset, the Prefab id; in Play Mode, runtime objects show their Runtime id), and the Category, with "World category (World)" as the default and every category from the settings.

Other menu commands #

Every command Shipready adds under Tools → Shipready:

Command What it does
Tools → Shipready → Saves → Start Opens the Start window (see The Start window)
Tools → Shipready → Saves → Setup Wizard Opens the Setup Wizard (see Setup Wizard)
Tools → Shipready → Saves → Play Mode Toasts Switches the Play Mode toast on and off (see The Play Mode toast)
Tools → Shipready → Saves → Report a Bug Copies a bug report to the clipboard (kit, Unity and render pipeline versions, platform, the last three saves and loads, and Diagnostics' findings, with no file paths beyond the save folder's name and no saved values) and shows the bug report form's address, with what it can fill already filled, on the Start window's Help and support page to copy. Nothing opens in a browser. The Start window's Report a bug button does the same.
Tools → Shipready → Saves → Save Inspector Opens the Save Inspector (see Save Inspector)
Tools → Shipready → Saves → Diagnostics Opens Diagnostics (see Diagnostics)
Tools → Shipready → Saves → Registries → Rebuild Registries Checks every prefab and Build Settings scene and brings the registries fully up to date
Tools → Shipready → Saves → Registries → Register Selected Assets Adds the ScriptableObjects and prefabs selected in the Project window to the Asset Registry (see The registries)
Tools → Shipready → Saves → Generators → Rebuild Menu Prefabs Rebuilds the three menu prefabs, after asking. Variants, scenes and the default theme and text are kept.
Tools → Shipready → Saves → Generators → Rebuild Demo Scenes Rebuilds the four demo scenes with their prefabs, settings and registries, after asking. Your own scenes, your Build Settings and your game's settings are not touched, and demo saves already made keep working (see Samples).
Tools → Shipready → Saves → Samples → Build Co-op NGO Sample Builds the co-op sample's scene and prefabs. It appears only once Netcode for GameObjects 2.x is installed in Unity 6 (see Samples).
Tools → Shipready → Saves → Required Packages Explains which of uGUI and, in Unity 2022.3, TextMesh Pro is missing and how to install it, and opens the Package Manager on it. It installs nothing itself. It appears only while one of them is missing (see Required Unity packages).

Performance #

Background work #

  • On the main thread, a save only captures: it reads the Saveables and copies the values. Reading the old file, migrating, merging, serialising, compressing, encrypting, writing and verifying, and writing the thumbnail and the slot cache, run on a background thread for every Async call and for SaveInBackground.
  • A load reads, verifies, unpacks and migrates on a background thread, and only puts the values into the game on the main thread. This holds for every Async load and for LoadInBackground.
  • The blocking calls (Save, Load, SaveGlobal, LoadGlobal, Autosave, Quicksave, LoadQuicksave, LoadNewestAutosave and RestoreBackup) do all of this on the calling thread. Use them where waiting is the point, such as when the game quits. Shipready's own quit autosave is one of them; its timed and scene-change autosaves run in the background.
  • Reading slot info for a menu (GetSlotInfo, GetSlotInfos, GetAutosaveInfos) reads files on the calling thread, but only once per change: the result is kept in slots.index until the file changes.

Profiler markers #

Each stage of a save and a load shows up in Unity's Profiler under its own marker, on the thread it ran on. Open Window → Analysis → Profiler, record while the game saves or loads, and find the markers in the CPU Usage module's Timeline view.

Marker Stage
Shipready.Save.Capture Gathering the values and the world before a save, on the main thread
Shipready.Save.Serialize Turning the save tree into JSON text
Shipready.Save.Compress GZip compression of the data
Shipready.Save.Encrypt Encrypting the data and signing the file
Shipready.Save.Write Every disk write: the temporary file, the swap into place, the backups, the thumbnail and the slot cache
Shipready.Save.Verify Reading the temporary file back and checking it before it is swapped into place
Shipready.Save.Read Every disk read
Shipready.Save.Decrypt Checking the signature and decrypting the data
Shipready.Save.Decompress Unpacking compressed data
Shipready.Save.Parse Turning JSON text into the save tree and checking its checksum
Shipready.Save.Migrate Running migration steps on an old save
Shipready.Save.Restore Putting the loaded values back into the game and the world, on the main thread
  • Shipready.Save.Capture and Shipready.Save.Restore always run on the main thread. With the Async and callback calls, the other ten run on a background thread, so the main thread shows no Shipready.Save.Write or Shipready.Save.Read during a background save. With the blocking calls they run on the calling thread.
  • The markers cost next to nothing while the Profiler is not recording.
  • The names are also constants in SaveProfilerMarkers (namespace RareGeometry.Shipready.Save.Diagnostics), such as SaveProfilerMarkers.Write, for code that reads the markers with Unity's ProfilerRecorder, for example in a performance test.

Where the time goes #

Main-thread time grows with the number of Saveables and ticked fields. Objects whose pose has not changed since the last save cost less, because Shipready reuses their saved position. Every report records how long each stage took (CaptureMilliseconds, SerializeMilliseconds, CompressMilliseconds, EncryptMilliseconds, StorageMilliseconds, RestoreMilliseconds and TotalMilliseconds), with the file size and object counts. The Console's one-line report gives the total for every save and load, and at the Verbose log level the time of each stage too. The Save Inspector's report list shows them all.

Compact files for release #

With Pretty Print on Automatic, release builds write compact JSON, without indentation. For large worlds, switch on Compress: JSON usually shrinks several times.

Measured benchmarks #

Shipready is built to these targets, measured in a release Windows build:

Test Target
P1: save 1,000 objects with 5 fields each Main-thread capture 8 ms or less; the whole save 100 ms or less
P2: save 10,000 objects Main-thread capture 60 ms or less; compression makes the file at least 3 times smaller
P3: restore 1,000 objects into a loaded scene 50 ms or less on the main thread
P4: a background save No disk work on the main thread, confirmed by the Profiler markers

Results for 1.0.0. The machine: AMD Ryzen 7 5700X3D (8 cores, 16 threads), 32 GB RAM, AMD Radeon RX 9060 XT, Windows 11 (10.0.26200), Unity 6000.3.24f1, Built-in render pipeline, release Windows players. Every run is the worst case: every object is changed before every save, so nothing can be skipped. Times are medians of 30 measured saves or loads (P1 and P3) or 40 (P2) after warm-up runs, and a test passes when its median meets the target.

IL2CPP (the backend to ship with), two runs of the 1.0.0 code, given in run order:

Test Measured Target Result
P1: main-thread capture, 1,000 objects × 5 fields median 6.311 / 6.241 ms (90th percentile 7.57 ms in the first run) 8 ms Pass
P1: whole save, capture to file on disk (SaveAsync awaited) median 59.34 / 62.79 ms 100 ms Pass
P2: main-thread capture, 10,000 objects median 58.87 / 58.27 ms (90th percentile 77.5 / 79.4 ms) 60 ms Pass on the median in both runs
P2: file size, readable against compressed 3,772,645 bytes readable, 811,127 bytes compressed: 4.65 times smaller 3 times Pass
P3: restore 1,000 objects into a loaded scene median 6.704 / 6.702 ms 50 ms Pass
P4: background save 0 of 35 storage calls and 0 of 105 file-metadata calls on the main thread. In a development build, 0 Shipready.Save.Write samples on the main thread and 25 on background threads (release builds compile the markers out). none on the main thread Pass
Automatic autosave thumbnail (informational) median 2.00 ms on the main thread (render and read back; the PNG is encoded on the background thread in 2.35 ms) n/a n/a

Single large captures can take longer than 60 ms. The P2 median meets the target, but only just, and the 90th percentile does not: 77 to 79 ms. So at least one capture of 10,000 changed objects in ten takes longer than the target. Earlier builds during development measured P2 medians of 52.9 to 54.7 ms; the 1.0.0 numbers above are the ones that describe the shipped code. A development build is slower and is not the target configuration.

Mono (release), one run of the 1.0.0 code:

Test Measured Target Result
P1: main-thread capture median 6.664 ms (90th percentile 7.63 ms) 8 ms Pass
P1: whole save median 70.46 ms 100 ms Pass
P2: main-thread capture, 10,000 objects median 66.60 ms 60 ms Fail
P2: file size 4.65 times smaller 3 times Pass
P3: restore 1,000 objects median 11.09 ms 50 ms Pass
P4: background save 0 of 35 storage calls on the main thread none on the main thread Pass

Mono misses the P2 capture target. On Mono, capturing 10,000 changed objects in one go takes a median of 66.60 ms on this machine, over the 60 ms target. The capture makes a call into the engine and some small allocations for every object, and both cost more under Mono than under IL2CPP. Every other target holds on Mono. For release builds of games with very large worlds, build with IL2CPP (Player Settings → Other Settings → Scripting Backend).

Autosave and quicksave thumbnails. An autosave's or quicksave's own picture adds a median of 2.0 ms on the main thread (90th percentile 2.2 ms, slowest 2.9 ms; 20 pictures of a scene with a light and 100 cubes, release IL2CPP player run with a graphics device). The PNG, about 2.3 ms more, is made on the save's background thread.

These are measurements on one machine, not guarantees: a slower CPU, a larger world or more fields per object take longer. The capture, and for an autosave or quicksave its picture, are the only parts of a save that hold the main thread; the capture grows with the number of saved objects and fields; the Profiler markers in Profiler markers show where the time goes in your own game.


Logging and reports #

Log levels #

Every line Shipready writes to the Console starts with [Shipready], followed by the SK code when there is one.

Level What reaches the Console
Off Nothing
Errors Failures only
Warnings (default) Failures and warnings, including the warnings in each save and load report, and a one-line report for every save and load while Report To Console is on
Verbose Everything: the one-line report for every save and load, with the time of each stage, and information lines such as where the saves are kept

Set Log Level in the settings asset; it applies when Shipready starts. To change it while the game runs, set SaveLog.Level (namespace RareGeometry.Shipready.Save.Diagnostics). Use Verbose while you investigate a problem, and Warnings for release.

The one-line report #

With Report To Console on (under Diagnostics in the settings asset; off by default, so the Console stays quiet), every save and load prints one line at the Warnings and Verbose levels:

[Shipready] Save slot_01.save: 12.4 ms, 5 categories, 214 values, 40 objects (3 spawned), 5321 bytes, 0 warnings
[Shipready] Load slot_01.save: 9.8 ms, 5 categories, 214 values, 40 objects restored, 1 skipped, 5321 bytes, read from Backup1, 2 warnings
  • A save or load that failed says so after the file name, for example Load slot_01.save failed with SK101 FileDamaged: ....
  • "read from Backup1" means the load fell back to a backup; "skipped" counts saved objects that are no longer in the scene.
  • At Verbose, the line also gives the time of each stage after a |: capture, serialize, compress, encrypt, storage and restore, and how many migration steps ran.
  • Tick Report To Console to get the line at Warnings. The warnings themselves are always printed, and Verbose always prints the line; every report is also in the Save Inspector's Recent saves and loads. To change it while the game runs, set SaveLog.ReportToConsole.

Shipready does not print every failed call. A call refused before it starts, such as one that returns SlotOutOfRange, only appears in the result, so always check Success in your own code. Shipready's own autosaves do print their failures.

The report #

Every save and load produces a SaveReport, available as result.Report and in the Saved and Loaded events:

Member What it holds
Operation, FileName What was done, to which file
CaptureMilliseconds, SerializeMilliseconds, CompressMilliseconds, EncryptMilliseconds, StorageMilliseconds, RestoreMilliseconds, TotalMilliseconds Timings
FileBytes, UnpackedBytes Size on disk, and size of the data once unpacked
CategoryCount, ValueCount Categories and values
ObjectCount, SpawnedCount, RestoredCount, DestroyedCount World objects saved or restored, runtime objects written or re-created, destroyed-list entries applied
SkippedCount, SkippedObjects Saved objects that are no longer in the scene, as "name (id)"
LoadedFrom, Packing, MigrationsRun Which copy was read, how the file was packed, which migration steps ran
Warnings Each with its own code and detail

report.ToString() gives a one-line summary. Every finished report is also kept, whatever the log level, in SaveLog.RecentReports (the last 20 of the Play session), and SaveLog.ReportAdded fires for each one. The Save Inspector lists them under Recent saves and loads.

using RareGeometry.Shipready.Save.Diagnostics;
using UnityEngine;

public class SaveDebugLog : MonoBehaviour
{
    void Awake()
    {
        SaveLog.Level = SaveLogLevel.Verbose;
        SaveLog.ReportAdded += report => Debug.Log("Save report: " + report);
    }
}

SaveLog.ReportAdded handlers are dropped at the start of every Play session.


Something unclear or wrong? Tell us · Get help