Create Unity mod menu instance without active class (DLL/Mono backend only)

Long time ago I worked with mod menu for DLL/mono based Unity games, but I wanna show you a trick. There is a way to show mod menu without using active classes such as UIRoot, Soundmanager… You use mscorlib.dll to create instance in order to show the mod menu.



Mod the Assembly-Csharp.dll with mod menu as usual and save it

Open mscorlib.dll

Expand the ”-” -> Locale and edit GetText(string msg) method


On the bottom-left corner, there is a yellow folder icon which is called ”Add Assembly Reference (Ctrl + O)”. Click on it


Select modified Assembly-Csharp.dll and click Open, and also UnityEngine.dll
If you don’t add UnityEngine.dll, you might get an error

Error                   CS0012               The type 'MonoBehaviour' is defined in an assembly that is not referenced. You must add a reference to assembly 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.               main.cs             7


Put the code
ModMenu.Start();
 And compile

 

Save mscorlib.dll

Don't panic if your menu won't load after you start the game. Just wait, the menu will appear while game loading

Comments

Popular Posts

VMOS Pro Global CN FREE Custom ROMs | Gapps, ROOT, Xposed | Android 4.4.4, 5.1.1, 7.1.2, 9.0 ROMs | NO VIP

How to activate VMOS Assistant to run VMOS on Android 12 and above