๐Ÿ’พ Save System Tool kit for Unity

June 25, 2025 ยท View on GitHub

A modular, extensible and editor-friendly Save System for Unity, supporting multiple serialization formats (PlayerPrefs, JSON, XML), with visual debugging and management tools built using Odin Inspector.

โœจ Features

  • ๐Ÿ” Strategy Pattern: Plug-and-play architecture with interchangeable save methods
  • ๐Ÿ’พ Supported Formats:
    • PlayerPrefs (with Odin serialization)
    • JSON file
    • XML file
  • ๐Ÿง  Editor Tool:
    • Odin Editor Window for previewing saved data
    • Visual decoding for PlayerPrefs, JSON, and XML
    • Deletion of individual entries
    • Auto refresh on changes
    • Clear indication of save locations per method
  • ๐Ÿงฑ Extensible Architecture:
    • Easy to add encryption, cloud saving, or custom file handling
    • Facade over save methods to switch runtime behavior

๐Ÿง  PlayerPrefs

  • Stored in system registry (Windows) or plist (macOS)
  • Serialized via Odin using Base64 + JSON

๐Ÿ“„ JSON

  • Located at:
    Application.persistentDataPath/player_data.json
    
  • Fully human-readable

๐Ÿ“‚ XML

  • Located at:
    Application.persistentDataPath/player_data.xml
    
  • Readable and compatible with standard tools

๐Ÿ“ท Screenshots

Save ExampleSwitch Method Example
Code1Code2
PlayerPrefsJSON
-------------------
PrefsJson

๐Ÿงฉ Save Config Export Tool

A flexible Unity editor tool for saving and loading ScriptableObject data (e.g., level balances, configs) to and from JSON files.

  • Export/import any ScriptableObject
  • Auto-generated file naming with timestamp
  • Load and overwrite previous saves
  • Built-in file management (delete, refresh)
  • Odin-based polished UI
Save New FileLoad / Overwrite
SaveConfig1SaveConfig2

๐Ÿ›  Tech Stack

  • Unity 2022+
  • Odin Inspector
  • Sirenix Serialization

๐Ÿงฉ Usage

Save:

saveLoadFacade.Save(SaveMethod.Json, playerData);

Load:

PlayerData loaded = saveLoadFacade.Load(SaveMethod.PlayerPrefs);