Agent skill
unity-migration
Install this agent skill to your Project
npx add-skill https://github.com/nolainjin/codex_2250/tree/main/codex-skills/unity-migration
SKILL.md
Unity Migration (Shelter 2250)
0) Inputs to confirm (ask if missing)
- Target Unity version (recommend latest LTS)
- Render/UI approach:
UGUI(Canvas) vsUI Toolkit(or hybrid) - 2D pipeline: built-in 2D vs
URP 2D - Target platforms: WebGL/PC/Mobile
- Parity target: “feature parity first” vs “re-architecture first”
1) Migration strategy (keep risk low)
- Create a new Unity project and commit it early.
- Port data + simulation first (no fancy visuals): resources, time, room placement rules, dwellers, save/load.
- Add a minimal debug UI (text HUD + simple buttons).
- Only then port visuals (room rendering, animations, VFX).
- Keep a running parity checklist (JS build vs Unity build).
2) Mapping guide (read only if needed)
- For a concrete mapping of the current JS codebase to Unity scripts/components, read
references/js-to-unity-map.md.
3) Unity architecture (recommended baseline)
- Scene:
Boot(init, load/save),Game(world),UI(HUD/menus) or singleGamescene + additiveUI. - Game loop:
- Render: per-frame (
Update) - Simulation tick: fixed step (e.g., 1 sec real-time) using a
GameTickService - “Game time” scale: multiplier (1/2/6x) applied consistently to tick + clock
- Render: per-frame (
- Data:
- Room types / costs:
ScriptableObject(RoomTypeDefinition) - Traits:
ScriptableObject(TraitDefinition) - Country bonuses:
ScriptableObject(CountryDefinition)
- Room types / costs:
- State:
GameStateplain C# object (serializable)SaveServicewrites JSON to disk (PC) and PlayerPrefs/WebGL fallback
4) Incremental milestones (suggested)
- “Simulation only”: tick + resources + rooms + dwellers + save/load (no graphics)
- “Build mode”: placement preview + validation + costs + upgrade
- “UI parity”: resource bars + dwellers panel + room modal
- “Visual parity”: 2D cutaway rendering, lighting, animations
- “Content”: events, exploration, country-specific flavor
5) Parity checks (fast)
- Room placement rule tests: given grid + rooms, validate allowed positions
- Tick consistency: at 1x/2x/6x, 60 seconds real-time should advance:
- 1x: 1 in-game hour
- 2x: 2 in-game hours
- 6x: 6 in-game hours
- Save/load: load legacy saves (if required) and new saves
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
unity-bootstrap
Bootstrap a new Unity project for a 2D management/simulation game. Use when you need to create the Unity project, choose URP/UI approach, set up folder structure, gitignore, packages (Input System/TextMeshPro), and establish a minimal scene + tick loop scaffold before porting gameplay systems.
git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Didn't find tool you were looking for?