intermediate
Save & Load System
Flexible save system supporting multiple save slots, auto-save, and both JSON and binary serialization.
Features
Multiple save slots
Auto-save with configurable interval
JSON and binary serialization options
ISaveable interface for custom save data
Save file encryption (optional)
Save/load callbacks
Included Scripts
/save-system/
SaveManager.cs
SaveData.cs
ISaveable.cs
SaveSlot.cs
Setup Guide
1
Import all scripts
2
Add SaveManager to your scene
3
Implement ISaveable on objects that need saving
4
Call SaveManager.Instance.Save(slotIndex) to save
5
Call SaveManager.Instance.Load(slotIndex) to load
Code Preview
C#
// ISaveable.cs - Interface for saveable objects
public interface ISaveable
{
string SaveId { get; }
object GetSaveData();
void LoadSaveData(object data);
}
// SaveManager.cs - Core save/load logic
public class SaveManager : MonoBehaviour
{
public void Save(int slot = 0) { /* ... */ }
public void Load(int slot = 0) { /* ... */ }
public void DeleteSave(int slot) { /* ... */ }
public bool SaveExists(int slot) { /* ... */ }
}Available Individually
These scripts are also available as standalone downloads: