Skip to content

A modular, extensible and editor-friendly Save System for Unity, supporting multiple serialization formats (PlayerPrefs, JSON, XML),

License

Notifications You must be signed in to change notification settings

SinlessDevil/SaveSystemToolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💾 Save System Tool kit for Unity

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

📁 File Formats

🧠 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 Example Switch Method Example
Code1 Code2
PlayerPrefs JSON XML
Prefs Json Xml

🧩 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 File Load / Overwrite
SaveConfig1 SaveConfig2

🛠 Tech Stack

  • Unity 2022+
  • Odin Inspector
  • Sirenix Serialization

🧪 Example Data Structure

[Serializable]
public class PlayerData
{
    public string PlayerName;
    public int Level;
    public float Health;
    public Vector3 Position;
    public bool HasPremium;
    public GameSettings Settings;
    public InventoryData Inventory;
    public QuestProgress[] Quests;
}

🧩 Usage

Save:

saveLoadFacade.Save(SaveMethod.Json, playerData);

Load:

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

📌 Related Projects

About

A modular, extensible and editor-friendly Save System for Unity, supporting multiple serialization formats (PlayerPrefs, JSON, XML),

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages