how to make a mod menu for all unity’s mono game, first make a C# Class Library .Net Framework project on visual studio community, and add all of those refrences, you can find them in thegamename_Data/Managed, or if it an il2cpp game and you’re using MelonLoader it’s in MelonLoader/Managed, if it’s BepInEx, it’s in BepInEx/unhollowed
Second write a Load Method if you’re using MonoInjector to inject it, if you’re using MelonLoader or BepInEx you don’t have to do this
1 * add Using UnityEngine; above namespace
2 * write : MonoBehaviour after your class name
3 * the Load method example, you can write exactly the same, or you can write anything you want, i write the game object there ellie, you can change it to your own name or whatever you want
and now how to make a menu window, first of all, create a new class, on this image click add new item
and double click on class
you can name your class whatever you want, here i write named it as CheatMenu.cs
after that just write : MonoBehaviour on your new class and also write Using UnityEngine; above namespace
back to your Load Method and write add like that ellie.AddComponent<CheatMenu>(); < CheatMenu is the name of your cheat Class
on your Cheat script, add those 3 Methods
private void OnGUI(), private void Update(), private void Start()
OnGUI Method are used to draw anything that will be displayed on your screen for example the cheat menu or game canvas, Update method are used to do Update, on making a mod we can do hide and show cheat menu on Update method and also make a fly hacks, and Start method are what the script does when it start loaded
1 * is the window content of the cheat or mod menu
2 * is the Rect of our window, Rect is the window position, height and width
3 * we draw the menu
4 * we’re telling the app our window position and size at Start
Rect(x, y, width, height);
x in rect is the x position of our screen
y in rect is the y position of our screen
width is the window width
height is the window height
to compile our dll file just click Start
and you will see this, just ignore if the error like this
to get our compiled .dll file just click this
and it will bring you to a folder, here just click bin
click debug
and here’s our dll file
in order to inject it, use monoinjector, Process is the target game, Assembly to inject is your cheat dll file, Namespace is your project namespace, Class name is the class name where your load method at, Method Name is your Load method name
Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.