Luis Escolano

2026 · Solo author

unity-mcp port

Minimal fork of the Unity MCP backported to Unity 2019.4 — the version Beat Saber's modding pipeline targets. Strips the parts that need newer C# language features and rewrites the rest down to C# 7.3.

Upstream CoplayDev/unity-mcp declares Unity 2021.3+ and leans on C# 8/9, UI Toolkit, and APIs that don’t exist in 2019.4. The fork keeps commits cherry-pickable so I can propose pieces back upstream, but the working copy targets the BS 1.34.2 modding world cleanly — concretely, the Aline boss fight that pushed me into needing it.

What “minimal” meant in practice: cut ~21 client configurators, the full UI Toolkit wizard, all Editor/Tools/{Graphics, Profiler, Vfx, ProBuilder} because their APIs are post-2020, and HTTP transport (stdio is enough for single-agent Claude Code). Then rewrite ~41 sites of C# 8/9 syntax to 7.3 — switch expressions to classic switches, range/index syntax to Substring/Skip, target-typed new() to explicit constructors. The README has the exhaustive list.

The hardest piece was execute_code: the .NET Framework CodeDom compiler aborts the entire compilation when it hits a DLL with corrupt metadata, and VivifyTemplate ships a legacy Mono-built Newtonsoft.Json.dll. The tool now detects “Metadata file ‘X’ does not contain valid metadata”, drops that DLL from references, and retries up to 8 times.