unity-memento-pattern
Implements the Memento pattern for capturing and restoring object states. Perfect for Loadout managers, Checkpoints, and Undo/Redo systems.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implements the Memento pattern for capturing and restoring object states. Perfect for Loadout managers, Checkpoints, and Undo/Redo systems.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Factory pattern for creating families of related objects. Supports both ScriptableObject composition and simple prefab instantiation.
Manage project boundaries using Assembly Definitions (.asmdef) for faster compile times and modular architecture. Based on the patterns by Adam Myhre. Enforces responsibility-based organization and handles Runtime/Editor/Tests splits.
Step-by-step object construction using fluent interfaces. Simplifies complex GameObject setup.
Professional Unity C# Code Reviewer. Detects anti-patterns, performance leaks, and enforces project-specific architecture.
Encapsulate actions as objects for queuing, undo/redo, and async execution.
Implements "Composition over Inheritance" using ScriptableObject configs and C# Tuples. Replaces deep class hierarchies with modular, has-a relationships.
基于 SOC 职业分类
| name | unity-memento-pattern |
| description | Implements the Memento pattern for capturing and restoring object states. Perfect for Loadout managers, Checkpoints, and Undo/Redo systems. |
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).
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.Refer to HotbarMementoExample.cs.txt to see how to save a list of ScriptableObjects using a copy-constructor.