skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
muharremtozan/unity-agent-skills54 installs

unity-memento-pattern

Implements the Memento pattern for capturing and restoring object states. Perfect for Loadout managers, Checkpoints, and Undo/Redo systems.

How do I install this agent skill?

npx skills add https://github.com/muharremtozan/unity-agent-skills --skill unity-memento-pattern
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides standard C# code templates and documentation for implementing the Memento pattern in Unity. No security issues or malicious patterns were detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Unity Memento Pattern

This skill provides a structured way to handle state snapshots in Unity. Inspired by Adam Myhre's implementation, it strictly separates state data (Memento), the state producer (Originator), and the state manager (Caretaker).

Core Features

  1. Immutable Snapshots: Ensures saved data cannot be corrupted by subsequent changes to the original object.
  2. Loadout Management: Built-in support for multiple save slots (Caretaker logic).
  3. Encapsulation: State structure is hidden from the resting system, exposing only what is necessary.

Core Files (Max 3)

  • IMemento.cs.txt: Base interfaces and generic Memento wrapper.
  • LoadoutManager.cs.txt: Caretaker implementation for managing list-based snapshots.
  • HotbarMementoExample.cs.txt: Practical application for UI/Item state persistence.

Usage

Refer to HotbarMementoExample.cs.txt to see how to save a list of ScriptableObjects using a copy-constructor.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/muharremtozan/unity-agent-skills/unity-memento-pattern">View unity-memento-pattern on skillZs</a>