scenario-unity-architecture
Use when structuring Unity 6.3 C# code: ScriptableObject data vs runtime state, events and services, inventory, health, save and load, Input System actions and key rebinding, async with Awaitable, assembly definitions, Enter Play Mode and domain reload, .meta files, Git, Smart Merge and LFS.
Install / Use
npx skills add scenario-labs/skills --skill scenario-unity-architectureInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of scenario-unity-architecture
scenario-unity-architecture scores 86/100 on our quality scale, 2387th of 4,705 Development & Engineering skills we index.
Its SKILL.md is 19 KB long, well organised into 10 sections and no code examples: a thorough specification that gives an agent plenty to work with.
With 1,048 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 35 days ago, so scenario-unity-architecture is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-11-20. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
scenario-unity-architecture compared with similar skills
All 4 of these similar skills score higher than scenario-unity-architecture; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| scenario-unity-architecture (this skill)by scenario-labs | 86 | 1.0k | 35d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 120.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 114.0k | today | CLAUDE.md |
| hyperframesby heygen-com | 100 | 88.2k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 73.0k | today | CLAUDE.md |
Frequently asked questions
- How do I install scenario-unity-architecture?
- Run
npx skills add scenario-labs/skills --skill scenario-unity-architecture. The install tabs above show the steps for each supported agent. - Which AI agents does scenario-unity-architecture work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is scenario-unity-architecture safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is scenario-unity-architecture still maintained?
- The repository was last updated 35 days ago, so scenario-unity-architecture is actively maintained.
Skill content
View source on GitHubname: scenario-unity-architecture description: "Use when structuring Unity 6.3 C# code: ScriptableObject data vs runtime state, events and services, inventory, health, save and load, Input System actions and key rebinding, async with Awaitable, assembly definitions, Enter Play Mode and domain reload, .meta files, Git, Smart Merge and LFS. Also when 'my save works in the Editor but not in the build', statics keep values on the second Play, events fire twice or never, an await runs after its object died, rebinds are lost on relaunch, a renamed class loses its data, a scene merge breaks." license: MIT
Unity architecture (gameplay programmer / architect)
Expert architecture in Unity is judged by what survives the edges: the second Play session, a
destroyed object mid-await, a relaunch of the built player, a class rename, a merge of two branches,
a prefab dropped into an empty scene. Data lives in assets, state lives in plain C# and files,
systems talk through events they do not own, and every claim is pinned by a test the agent can run
without a mouse. Target: Unity 6000.3.21f1, Input System 1.20.0, Test Framework 1.6.0, macOS. If a
sibling skill named here is missing from your available skills, load it with skill_get (Scenario
MCP) or ask the user to install it (https://github.com/scenario-labs/skills#install); unattended,
proceed from tool schemas and flag the gap.
REQUIRED BACKGROUND: scenario-unity-expert (channels, review loop, 6.3 traps). Toolkit:
ut_env, ut_run, ut_live plus this skill's scripts/ut_arch.py,
scripts/AgentKit/Architecture/ jobs and
scripts/templates/ (a tested Game.Core / Game.Runtime / Game.Editor / tests
layout).
Status (2026-09-24): every procedure ran in Unity 6000.3.21f1 on this Mac:
tests/code/unity-architecture/run_all.sh --live (results in
archive/tests/unity-architecture/live_results.jsonl).
Stance (the expert delta)
- ScriptableObjects are definitions, never saves. Play-mode writes to an SO persist in the
Editor and reset on every launch of a build (Code Monkey, 5a-ztc5gcFw [00:04:17]). Observed
sharper: the write lives only in Editor memory (
IsDirtyfalse, the.assetunchanged even afterSaveAssets), so a file hash never sees it; only an in-memory guard in the process that plays does (so_guard, the prefab SO test). A macOS player run twice started from the baked value while the save FILE carried over. Runtime modifiers apply to a struct copy (config.Stats, Tarodev, tE1qH8OxO2Y [00:11:18]); live registries are runtime sets, never scene searches (Hipple, raQ3iHhE_Kk [00:40:06]). Saves: versioned JSON of ids, atomic write, backup, migrations. - Read Enter Play Mode before trusting any Play test. With domain reload off (an option in 6.3,
the default for new 6.6 projects) a static counter read 2 and a static event had 2 subscribers on
the second Play (observed). Unregister static handlers on
ExitingPlayMode(the Manual's best practice; observed clean on its own) and reset values atSubsystemRegistration;DoublePlayproves both. Scene reload off makes Editor startup unrepresentative, and a script change still reloads the domain (6.3 Manual). - Every await has an owner. Awaits survive Destroy and Play exit (Unity, eXkFPoEp3BA
[00:13:28]): a token-less loop ticked 13 to 14 more times in the 0.3 s after
Destroy(observed). MonoBehaviours passdestroyCancellationToken(Lifetime.Linked(this)when IO must also stop at exit); plain C# services passApplication.exitCancellationToken. Never await an Awaitable twice (pooled:AsTask()), never block on a Task. Release players skip the main-thread check: off the main thread a development player threw onpersistentDataPath,Time.time,transformandnew GameObject, the release player threw nothing (observed). Smoke-test threading in a development build. - Designers wire, code decides. Serialized SO references are the injector designers can see
(Hipple [00:14:39]). Channels decouple sender and receivers, iterate listeners backwards
([00:33:23]) and ship a debug plan: counts, a log toggle,
RaiseDebug()from a job, an inspector button ([00:36:07]). UnityEvent is a serialized function call ([00:29:26]): rare designer-wired responses only (0 B per invoke measured on 6.3, but targets are hard references resolved by method name). One composition root runs first ([DefaultExecutionOrder(-1000)], git-amend, PJcBJ60C970 [00:12:01]; without it a consumer found nothing, observed) and fails loudly. Each prefab runs alone in an empty scene ([00:16:29]). Statics suit a small solo project only (Weimann, hQE8lQk9ikE [00:01:28]; Tarodev [00:03:00]), with resets. Enums only for sets fixed "by some law"; categories designers extend become SO assets ([00:46:39]). - Rebinding is a state machine with six traps. The action must be disabled (the package throws
otherwise); Escape does not cancel a Button rebind by default; a composite head cannot be
rebound; duplicates are judged on
effectivePath, composite parts only against earlier parts, modifier combos pershortcutKeysConsumeInput(off by default: Shift+B also fires B); Reset All deletes the persisted overrides;LoadBindingOverridesFromJsonwipes existing overrides unless passedfalse(samyam, csqVa2Vimao [00:12:51], [00:27:44], [00:33:22]; 1.20 manual; all tested). For the UI, start from the Rebinding UI sample: in 1.20 it already disables and disposes but lacks four fixes (ut_arch.rebind_audit). Eachnewof a generated input class is a separate asset: share one. - Assemblies are a contract. A Core with
noEngineReferencesholds rules testable in milliseconds; runtime asmdefs never reference editor ones (the Editor compiles it, the player build fails, observed). Test asmdefs referenceUnity.InputSystem.TestFramework;testableswas not needed on 6000.3.21f1 (observed). - Serialized data survives refactors and merges only on purpose.
[FormerlySerializedAs]for fields,[MovedFrom]for renamed[SerializeReference]classes (without it the entry loaded as null, observed),[Serializable]on every[SerializeReference]type (6.3 tolerated its absence; 6.4 requires it per the version notes). UnityYAMLMerge exits 2 on any conflicted field even with-l/-r, and without them writes the BASE value (observed): check the exit code, then open the result in Unity.
Establish first
Team shape (who wires behavior: designers or programmers), project lifetime, target platforms (Web
has no managed threads), Enter Play Mode setting, input devices (keyboard-mouse, gamepad, touch,
local multiplayer) and modifier shortcuts, save needs (slots, cloud, migrations), VCS (Git + LFS by
default). Defaults: project-wide actions, Game.Core/Runtime/Editor/Tests asmdefs, SO definitions +
plain C# state, event channels between systems, runtime sets for registries, one GameRoot, JSON
saves under persistentDataPath, Git with the UnityYAMLMerge driver. Run ArchJobs.ProjectFacts
and write its answers into the plan.
Workflow
- Scaffold and compile. Goal: rules in pure C#. How:
ut_arch.install(P),ut_arch.scaffold(P)(A1), thenArchJobs.ProjectFacts(Unity -batchmode -nographics -quit -executeMethod AgentKit.Architecture.ArchJobs.ProjectFacts). GATE: zero compile errors and warnings;ArchJobs.AssemblyGraph: Game.Coreengine_refs == 0,violations == []. - Data as assets. Goal: definitions designers edit. How:
ArchJobs.CreateAssetswithut_arch.item_specs()(SerializedObjectedits,managed_refsfor[SerializeReference]lists, SetDirty only on change) (A2, A13). GATE: second run allunchanged;ItemDatabaseValidatorclean. - Core systems with tests. Goal: inventory, health, events, sets. How: templates;
ut_run.run_tests(P, "EditMode", assemblies="Game.Tests.EditMode"). GATE: all pass;ut_arch.code_lintno warn or error in runtime code (A10). - Save and load. Goal: state that survives relaunch. How:
SaveService(A3). GATE: EditMode round trip, corrupt-file fallback, v1 migration;CrossProcessSaveacross two editor processes; a player run twice for persistence claims (A4); a development player when saves touch threads (A12). - Input. Goal: every device, rebinding that persists and resets. How: project-wide actions,
InputContext,RebindFlow,BindingStore,.inputactionsedited as JSON;ArchInputAudit.Audit(A5, A15). GATE:InputTestFixturetests per trap; audit withoutmissing_schemeorduplicate_binding;rebind_auditmissing nothing. - Async and lifecycle. Goal: no orphan work. How:
async Awaitable Start()with a token,AsTask, PlayMode suite; async tests as a[UnityTest]returning the inner Awaitable, orasync Task(A6, A7, A14). GATE: no tick after Destroy; prefab isolation and prefab SO guard pass. - Play-mode hardening. Goal: session 2 equals session 1, events reach responses. How:
ArchJobs.StaticStateAudit, thenArchPlayMode.DoublePlaywithso_guardandinvoke(RaiseDebugon each channel) in the project's mode (A8, A11). GATE: noarch.static_without_resetin own assemblies; watched values equal across sessions;so_changed_in_memory == []; every invokeokwith its response counted. - Version control. Goal: merges and moves never break references. How:
ArchJobs.SetVcsSettings,ut_arch.write_vcs_files,git_setup_unity_merge,meta_audit,yaml_merge, thenArchJobs.InspectAsset(A9). GATE:meta_audit.ok;.metanot in LFS; clean merges exit 0 and deserialize; conflicts stay unmerged with a report. - Hand off with evidence (scenario-unity-expert report format): Unity call per step, Verified, Assumed.
Numbers
| Value | Relative to | Source |
| ------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------- |
| 11 to 13 s | one batch job on this project (editor boot included) | observed |
| about 11 s / 16 s | EditMode suite (33 tests) / PlayMode suite (17 tests), final run | observed |
| 13 to 14 ticks | token-less 0.02 s Awaitable loop in the 0.3 s after Destroy | observed |
| 2 / 2 | static counter / static event subscribers in Play session 2, domain reload off | observed |
| 4 of 6 / 0 of 6 | Unity calls that threw off the main thread in a development / release macOS player | observed |
| 0 B | heap growth over 10,000 channel raises or persistent UnityEvent invokes after warm-up | observed |
| about 37,000 to 61,000 fps | batch -nographics Play mode (uncapped): wait on time, not frames | observed |
| 0.05 s; false | PerformInteractiveRebinding OnMatchWaitForAnother; shortcutKeysConsumeInput default | package source 1.20; observed |
| next Update (33 ms at 30 fps) | Task continuation started on the main thread | 6.3 Manual |
| about 500 KB | binary size above which Git LFS pays | Pettersen 2016 |
| exit 0 / 2 | UnityYAMLMerge clean / any c
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
120.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
114.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
hyperframes
88.2kAI video you can actually edit. HyperFrames is a free, open-source AI video editor. Describe any video and get a real project you can change down to the frame.
ai-job-search
73.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
