Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
MenuLibFix
Compatibility fixer for MenuLib 2.5.4 on the current R.E.P.O. build: re-installs the broken UIMouseHover / StateClosing / StateInactive hooks via Harmony prefixes, eliminating the InvalidProgramException spam.
| Last updated | 2 hours ago |
| Total downloads | 25 |
| Total rating | 1 |
| Categories | Mods Client-side AI Generated |
| Dependency string | cat7street-MenuLibFix-1.0.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
MenuLibFix
Compatibility fixer for MenuLib 2.5.4 on the current R.E.P.O. build (2026-09). Same companion-plugin approach as BetterMapFix: MenuLib itself is left untouched, a sidecar plugin re-installs the broken hooks via Harmony prefixes.
The problem it fixes
MenuLib rewrites game methods with MonoMod IL hooks + IL pattern matching. After the game update the compiled IL no longer matches, producing invalid IL:
InvalidProgramException: Invalid IL code in (wrapper dynamic-method)
SemiFunc:DMD<SemiFunc::UIMouseHover> (...): IL_00e7: stloc.s 13
The exception aborts MenuLib.Entry.Awake, so the MenuPage.StateClosing and ChatManager.StateInactive hooks never get installed either — every mod depending on MenuLib runs crippled (broken in-game settings menus, etc.).
What this plugin does
| Patch | Approach |
|---|---|
SemiFunc.UIMouseHover |
Full port of the current game logic + MenuLib's custom scroll-view check, as a full-replacement Harmony prefix |
MenuPage.StateClosing |
Current game logic ported, with MenuLib's custom-page slide-out positioning and cached-page preservation inline |
ChatManager.StateInactive |
Skips the original while a MenuLib input field holds focus |
All member references are compile-time checked against the current game assembly — a future game update will fail the build loudly instead of corrupting IL at runtime.
Requirements
- BepInExPack 5.4.23+
- MenuLib 2.5.4
中文说明
MenuLib 2.5.4 在 2026-09 版本游戏上的兼容修复伴生插件:用三个 Harmony prefix 重挂 UIMouseHover / StateClosing / StateInactive 钩子,消除 InvalidProgramException: SemiFunc.UIMouseHover 报错及其导致的 MenuLib 初始化中断,让依赖 MenuLib 的模组(自绘菜单类)恢复正常。
Source code: cat7street/RepoPlugins (MIT)