🧰 Zion Tools
Unity Editor Asset Tools
Concepts
The inspector is built around two interfaces, plus one optional capability interface added in 1.1. Understanding the split makes everything else obvious.
Source - ISaveSource
Where saves come from. Each source knows how to enumerate, read, write, and delete its own saves. Examples:
- A folder of files on disk (
PersistentFileSource, built-in) PlayerPrefskeys (PlayerPrefsSource, built-in)- ScriptableObject snapshots in your project
- A cloud save backend
- An in-memory test fixture
A source returns SaveEntry handles - lightweight pointers, not the data. The window only loads the payload when you click an entry.
Format - ISaveFormat
How to interpret a payload. Each format claims whether it can parse a given payload, parses bytes into an editable tree, and serializes the tree back. Examples:
- JSON (
JsonSaveFormat, built-in) - Raw text fallback (
RawTextFormat, built-in) - Binary protocols (MessagePack, Protobuf, your own format)
The split lets one source feed many formats - the same folder might hold JSON, binary, and plain-text saves, and the inspector auto-detects each.
Backup - ISaveBackupProvider 1.1
An optional capability a source can add on top of ISaveSource. A source that implements it can hand the inspector the previous payload of any entry, which powers the Compare > With Backup action. Both built-in sources implement it; custom sources opt in with a single method - see Custom Source.
Entry - SaveEntry
One save's metadata: display name, identifier, size, last-modified date. The Identifier is opaque - the source decides what it means (file path, PlayerPrefs key, asset GUID, etc.).
Node - SaveNode
An editable tree value. Six kinds: Object, Array, String, Number, Boolean, Null. The format produces a tree of these; the window renders foldouts and inline editors; the format serializes the tree back to bytes when you hit Save. Diff, schema validation, search and clipboard all operate on this tree - which is why they work with every format, built-in or custom.
Auto-discovery
Both registries (SaveSourceRegistry, SaveFormatRegistry) scan every loaded assembly for concrete types implementing the interfaces with a public parameterless constructor. You never register anything manually - just drop a class in an editor assembly and it appears in the dropdown after the next domain reload. ISaveBackupProvider is not discovered separately - it is detected on the current source when you open the Compare menu.