- A Unity project compiles into the assemblies Unity would make:
- one per
.asmdef, under Assets or in an embedded package, holding its folder's scripts (and.asmreffolders), minus subfolders with their own; Assembly-CSharp-firstpassforPluginsandStandard Assets;Assembly-CSharpfor the rest. Firstpass and Assembly-CSharp reference every auto-referenced asmdef. References may name an asmdef or give its GUID; references outside the project (Unity packages) are reported. Editor-only, test and unmet-defineConstraintsassemblies are left out, as in a player build. A reference cycle is a compile error.
- one per
- All assemblies build in one
dotnet buildof a generated solution, and MSBuild's incremental build skips unchanged ones. - Hot reload works per assembly. A changed assembly reloads together with every assembly that references it, because their code is bound to the old one. Types may move between assemblies, and assemblies may appear or disappear.
- ScriptableObjects hot reload too. Live instances are tracked weakly. Each one gets OnDisable, a new instance with its fields copied takes its place (references in scripts, other assets and the asset cache are updated), and then OnEnable runs.
- An MCP e2e test covers a Coin Dash copy with asmdefs: a GUID reference, an asmref sharing internals, firstpass, an editor-only assembly and a broken test assembly. It edits a core assembly and checks that its dependents reload with their state and with ScriptableObjects swapped. It also checks that a cycle is a compile error.
- Next: MCP resources and the
exectool,.csprojgeneration for IDEs, precompiled plugin DLLs.
Phase 4 · Slice 8 ·