// the find
NeighTools/UnityDoorstop
Doorstop -- run C# before Unity does!
Doorstop is a native C shim that injects a managed .NET assembly into a Unity process before Unity's own code runs — the foundation that BepInEx and other Unity modding frameworks are built on. It handles both Mono and Il2Cpp runtimes, which covers essentially all Unity games. If you're building a game modding loader or need to hook into Unity at the earliest possible point, this is the right tool.
The dual-runtime support (Mono vs Il2Cpp) is genuinely well thought out — each path makes the correct tradeoff: reuse the game's CLR for Mono, spin up a separate CoreCLR for Il2Cpp where you have no choice. The PLT hook approach on Linux/macOS is solid low-level technique. Debugger support without patching Mono is a real quality-of-life win for modders. The xmake build system handles cross-platform native builds cleanly, and the proxy DLL trick on Windows (generating forwarding stubs for system DLLs) is the right way to hook into a process without needing an external launcher.
564 stars understates actual usage — almost all BepInEx installs depend on this — but the repo itself has minimal documentation on what actually happens at the C level, which makes it harder to understand failure modes. The Il2Cpp path requiring you to bundle a full CoreCLR runtime is a significant deployment burden that the README mentions but doesn't help you solve. There's no test suite visible in the tree; for something this close to the metal, regressions across Unity versions are a real risk and there's no safety net. The config file is an INI on Windows and a shell script wrapper on *nix — that inconsistency is awkward for tools that need to write Doorstop config programmatically.