reproducible-on-every-machine-unity
Reproducible on Every Machine: Never Patch a Package in Place
Section titled “Reproducible on Every Machine: Never Patch a Package in Place”Always-loaded. The repo is the single source of truth for what compiles. The tell: if the fix would vanish on a fresh clone, it is not a fix.
Packages/, submodules, and vendored third-party folders (Assets/Plugins/<Vendor>/) are read-only from the consuming repo — .cs, .asmdef, package.json, prefabs, .meta, assets alike. An edit there is invisible to the consuming repo’s git and is wiped by the next git submodule update or package resolve.
Broken third-party or submodule code: update the package (or the Unity version); a The1Studio submodule fix goes in that submodule’s repo, then bump the pointer; a paid asset gets re-acquired from the vendor. Never patch the package source or hand-edit vendored DLLs/scripts. Narrow exception: a documented, idempotent build-unblock patch held in the consuming repo (.claude/patches/<vendor>-<unity-version>/ + a re-apply script).
Everything the compiler needs is committed, or is a documented prerequisite — no third category. A non-committable prerequisite needs a runnable command and the symptom it causes when absent (t1k:unity:base:upm-auth, t1k:unity:base:project-structure § Gotchas).
Prove it with a real clone, and report a dirty tree — reading Packages/manifest.json and concluding it “should be fine” is not verification.
Full detail
Section titled “Full detail”Originating incident (a deleted package leaving 196 files referencing it) and the vendored-patch escape-hatch record: docs/reproducible-on-every-machine-unity.md.
Related
Section titled “Related”unity-forbidden-operations.md · library-quality-mandate-unity.md + core library-third-party-decoupling.md · t1k:unity:base:upm-auth · t1k:unity:base:project-structure