ZionGames Docs

Home / Zion Tools

🧰 Zion Tools

Unity Editor Asset Tools

Built-in Providers

The asset ships with two sources and two formats. All built-in sources are designed to be non-destructive, and both sources implement ISaveBackupProvider so Compare > With Backup works out of the box.

ComponentTypeOrderWhat it does
PersistentFileSourceSource0Recursively scans Application.persistentDataPath for *.json, *.sav, *.dat, *.save. Writes atomically with an auto-backup .bak sibling. Implements ISaveBackupProvider.
PlayerPrefsSourceSource5Lists PlayerPrefs entries from a runtime manifest key and/or an editor-side watch list. Auto-backs up the previous value to EditorPrefs before each save. Implements ISaveBackupProvider.
JsonSaveFormatFormat10Full JSON parser and writer. Accepts any payload whose first non-whitespace byte is { or [. Also exposes the static ParseFragment/WriteFragment helpers used by clipboard copy/paste.
RawTextFormatFormatint.MaxValueCatch-all. Exposes the payload as one editable text field. Always claims the payload - so it only runs when no other format does.

The JSON parser is hand-rolled (~200 lines, no external dependencies) and emits two-space-indented output on serialize. Unity's JsonUtility.FromJson reads it back without issue.

Format auto-detection

The inspector calls SaveFormatRegistry.FindBest() to pick a format for each entry. With the built-ins, that means JSON for anything starting with { or [, otherwise Raw text. Formats are tried in Order ascending, so a lower number wins.

Continue to PlayerPrefs.