mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-19 15:51:45 +00:00
a06688e85bbac09023c213fd9a5efee1a4fa4d07
* Degrade instead of crashing when the interop assemblies are missing OnInvokeMethod references interop types (UnityEngine.Application/LogType) in its body. The CLR JIT-compiles the whole method before running any of it, so when the interop assemblies cannot be resolved the method throws FileNotFoundException at JIT time -- before its own try is entered -- and the exception escapes into the native runtime-invoke detour and crashes the process with nothing logged. Move the interop-referencing call into its own SetupUnityLogging method called inside the try. OnInvokeMethod then JITs without the interop assemblies present, the missing-interop failure is caught, and the loader degrades (logs and continues) so the game runs unmodded. Set unhook at the top of the try so the detour fires exactly once even on failure. * Condense the interop-degrade comments and reword the fatal log Per review: trim the JIT-bypass comments to one line each and change the fatal message to "Unable to execute IL2CPP chainloader, no plugins will be loaded".
BepInEx
Bepis Injector Extensible
BepInEx is a plugin / modding framework for Unity Mono, IL2CPP and .NET framework games (XNA, FNA, MonoGame, etc.)
(Currently only Unity Mono has stable releases)
Platform compatibility chart
| Windows | OSX | Linux | ARM | |
|---|---|---|---|---|
| Unity Mono | ✔️ | ✔️ | ✔️ | N/A |
| Unity IL2CPP | ✔️ | ❌ | ✔ | ❌ |
| .NET / XNA | ✔️ | Mono | Mono | N/A |
A more comprehensive comparison list of features and compatibility is available at https://bepis.io/unity.html
Resources
How to install (latest releases)
How to install (Bleeding Edge, BepInEx 6)
Available plugin loaders
| Name | Link to project |
|---|---|
| BSIPA | BepInEx.BSIPA.Loader |
| IPA | IPALoaderX |
| MelonLoader | BepInEx.MelonLoader.Loader |
| MonoMod | BepInEx.MonoMod.Loader |
| MuseDashModLoader | BepInEx.MDML.Loader |
| Partiality | BepInEx-Partiality-Wrapper |
| Sybaris | BepInEx.SybarisLoader.Patcher |
| UnityInjector | BepInEx.UnityInjector.Loader |
| Unity Mod Manager | Yan.UMMLoader |
| uMod | BepInEx.uMod.Loader |
Used libraries
- NeighTools/UnityDoorstop - v4.5.0
- BepInEx/HarmonyX - v2.10.2
- 0x0ade/MonoMod - v22.7.31.1
- jbevain/cecil - v0.10.4
IL2CPP libraries
- SamboyCoding/Cpp2IL - v2022.0.7.2
- BepInEx/Il2CppInterop - v1.4.5
- BepInEx/dotnet-runtime - v6.0.7
License
The BepInEx project is licensed under the LGPL-2.1 license.
Languages
C#
96.2%
Shell
3.8%
