Tool
BepInEx
Plugin and patching framework for Unity Mono, Unity IL2CPP and .NET Framework games such as XNA, FNA and MonoGame titles, which loads mods and analysis plugins into a locally installed game. Plugins patch methods at runtime with the bundled HarmonyX and MonoMod.RuntimeDetour, while preloader patchers rewrite managed assemblies with Mono.Cecil before the game loads them; on IL2CPP games it runs Cpp2IL and Il2CppInterop to generate interop assemblies from the game binary and global-metadata.dat. Its guides also cover configuration, logging, and debugging plugins and game assemblies with dnSpy.
Requirements and limitations
- Latest stable release at review: v5.4.23.5, published 2026-02-08 from the v5-lts branch, with Windows x86/x64, Linux x86/x64, macOS universal and patcher archives; the README says only Unity Mono has stable releases. The reviewed master commit (2026-10-16) declares the unreleased 6.0.0 and is 75 commits after the latest 6.x prerelease, v6.0.0-pre.2 from 2024-08-27, which ships Unity Mono, Unity IL2CPP and .NET builds; newer bleeding-edge builds are published separately. The guides note that the preloader-patcher contract changed between v5 and v6.
- The README's compatibility chart lists Unity Mono on Windows, macOS and Linux, Unity IL2CPP on Windows and Linux but not macOS or ARM, and .NET/XNA games on Windows or through Mono on macOS and Linux. The master installation guide lists Windows 7–10, Linux distributions with GCC 10+, macOS 10.13+ and Unity 3 or newer. Source builds use the bundled Cake script and need .NET 6.0 or newer.
- BepInEx installs into the user's own game directory: the guide identifies Unity Mono games by a Managed folder and IL2CPP games by il2cpp_data. IL2CPP interop generation reads the game's binary and global-metadata.dat and, by default, downloads managed Unity base libraries for the game's Unity version from unity.bepinex.dev; a configuration option points it to a locally placed archive instead. Some games need the documented troubleshooting steps, and per-game compatibility is not implied.
- LGPL-2.1 (LGPL-2.1-only in the package metadata); the libraries it uses, including UnityDoorstop, HarmonyX, MonoMod, Mono.Cecil, Cpp2IL and Il2CppInterop, keep their own licenses. This entry covers single-player modding and analysis of locally installed games; game license terms are separate from the framework's license. No game was modded or run, and the reviewed sources establish no REA connection.
About this entry
- Type
- Tool
- Category
- Game analysis tools
- Relationship
- Foundation tool
- Targets
- Game
Sources reviewed
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · BepInEx/BepInEx · Revision 6cea286
- LICENSE GitHub · BepInEx/BepInEx · Revision 6cea286
- Directory.Build.props GitHub · BepInEx/BepInEx · Revision 6cea286
- docs/BUILDING.md GitHub · BepInEx/BepInEx · Revision 6cea286
- Runtimes/Unity/BepInEx.Unity.IL2CPP/Il2CppInteropManager.cs#L48-L110 GitHub · BepInEx/BepInEx · Revision 6cea286
- BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs GitHub · BepInEx/BepInEx · Revision 6cea286
- https://github.com/BepInEx/BepInEx/releases/tag/v5.4.23.5
- https://github.com/BepInEx/BepInEx/releases/tag/v6.0.0-pre.2
- https://docs.bepinex.dev/master/articles/user_guide/installation/index.html
- https://docs.bepinex.dev/master/articles/dev_guide/runtime_patching.html
- https://docs.bepinex.dev/master/articles/dev_guide/preloader_patchers.html