Save & Load System
Flexible save system supporting multiple save slots, auto-save, and both JSON and binary serialization.
4 scripts intermediate Core system Any game with persistence
The full files for this kit are not published yet, so there is no download. The preview shows how the main pieces fit.
What is inside
- SaveManager.cs Not published yet
- SaveData.cs Not published yet
- ISaveable.cs Not published yet
- SaveSlot.cs Not published yet
What it does
- 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
Setup, in order
- Import all scripts
- Add SaveManager to your scene
- Implement ISaveable on objects that need saving
- Call SaveManager.Instance.Save(slotIndex) to save
- Call SaveManager.Instance.Load(slotIndex) to load
If something does not work
- Some objects do not save
- Only objects that implement ISaveable are saved. Give each one an ID that stays the same between sessions; an ID generated at runtime cannot match its saved data.
- Loading puts objects back in the wrong state
- Load after every saveable object has finished its own Awake, for example from Start or after the scene finishes loading, so loaded values are not overwritten by initialization.
Preview
An excerpt of the kit's main types, and the Inspector fields they expose.
Inspector
Fields from the kit's preview excerpt; the full kit has more.
No serialized fields. This is a static helper or a base class: you call it from code rather than configure it in the Inspector.
Excerpt
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) { /* ... */ }
}Related
- RPG Essentials KitCore RPG systems: health, inventory, dialogue, quests, save/load, and damage numbers — everything for an RPG prototype.
- Complete Inventory SystemDrag-and-drop inventory with stackable items, equipment slots, and JSON save/load persistence.
- Build an RPGHealth, inventory, dialogue, quests, save/load, and damage numbers — the RPG essentials.