Reputation: 402
I've been developing a game in unity(called Humanity Clicker, if anyone is interested) so I been doing a lot of research on how the engine works and etc.
It just so happens that there are projects, such as MelonLoader, which are capable of modding basically any Unity game, no matter if using mono or IL2CPP. And while I can understand how they mod mono projects(as its not compiled into machine code), IL2CPP converts MSIL into machine code, and thus should make it basically impossible to mod, since the game's code would be unreadable for humans.
How do tools like that work?
Upvotes: 2
Views: 1641
Reputation: 21
For IL2CPP Games, you can still freely mod them. What is mostly the issue, is that you cannot see functions as easily as with Mono. There are multiple tools that allow you to dump the code into a more readable format with help of Programs such as GHIDRA or IDA. But, it mostly depends on what you wish to mod, implementing new elements may not be difficult if you do not require any of the game's functionality, such as adding a new plant. If you wish to explore the game without seeing the code, there are tools such as UnityExplorer which try to mimic a Unity Editor View of the Scene. Also, if you know what a certain function might be doing, you can either replace it or add a prefix/postfix. This allows you to have a bit more control of how it is executed. One possible postfix could be a UI function which opens up a shop GUI, you could add a postfix to add more elements to the shop or even modify them after execution.
Upvotes: 1