unity-data-persistence

Bind Unity MonoBehaviours to serializable DTOs for deterministic save/load.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/MuharremTozan/Ohm-Yura --skill unity-data-persistence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-data-persistence
Source: https://github.com/MuharremTozan/Ohm-Yura/tree/main/.agents/skills/unity-data-persistence
Command: npx skills add https://github.com/MuharremTozan/Ohm-Yura --skill unity-data-persistence

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Robust Save/Load system for Unity that uses data binding to keep DTOs in sync with live game objects, enabling deterministic serialization and backend-agnostic persistence.

Core Features & Use Cases

  • Data Binding Pattern: MonoBehaviours hold a live reference to a DTO, so saving is just serializing the in-memory data.
  • IBind<TData> / ISaveable: Interfaces that connect scene entities to their save data.
  • SerializableGuid: Stable identity for matching saved data to spawned entities.
  • Swappable Backend: IDataService + ISerializer allow swapping from local JSON to cloud/binary with a single change.
  • Multi-Entity Binding: Bind<T, TData>(List<TData>) for many-entity scenarios (enemies, spawners, etc.).

Quick Start

Define your DTOs, bind them to entities on scene load, and use the SaveLoadSystem to save and load game data.

Frequently Asked Questions about unity-data-persistence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save and load game state in Unity reliably across multiple scenes?

To save Unity game state reliably, link live MonoBehaviour data to serializable DTOs using data binding. This keeps in-memory data synced with live game objects, enabling deterministic saves across multiple scenes.

What is the data binding pattern for Unity save systems?

The data binding pattern for Unity save systems involves MonoBehaviours holding a live reference to a DTO. Saving simply serializes this in-memory data, ensuring deterministic state persistence without scanning object properties.

How do I match saved data to spawned entities in Unity?

Match saved data to spawned Unity entities using SerializableGuid for stable identity. This ensures deterministic re-binding of per-entity state, like inventory or enemies, when loading a scene.

Can I swap local JSON save backends to cloud or binary storage in Unity?

You can swap local JSON save backends to cloud or binary storage in Unity by using IDataService and ISerializer interfaces. This allows changing the persistence backend with a single code modification.

How do I save multiple actors or enemies simultaneously in Unity?

Save multiple actors or enemies simultaneously in Unity using multi-entity binding. The Bind<T, TData>(List<TData>) method connects scene entities to their save data for many-entity scenarios like spawners.