ByNameModding is a library for modding il2cpp games by classes, methods, field names on Android. It includes everything you need for modding unity games.
Requires c++14 minimum.
- Finding everything by names (classes, methods, fields ane etc.)
- Adding your own classes to game that work even with AssetBundles!
- Use basic c# structs like string (monoString), array (monoArray), dictionary (monoDictionary) that fully work.
BNM can add your own class to game, it requires c++17 and above.
If you nest your class from MonoBehaviour (or other class with events) methods like Update
will work.
And it fully computable with AssetBundles!
For bundles need add your class to dlls that listed in ScriptingAssemblies.json.
Basically BNM add classes to Assembly-CSharp.dll
that always in this list.
If you want to use your own dll with bundles, add it to this file, but this will work only if you use BNM internally.
Yes, you can, but this is not tested. To do that see BNM::External::LoadBNM
- First clone the repo and add it to your project.
- Set c++ version to 14 or higher
- Add BNM.cpp to Android.mk or CMakeLists.txt.
Android.mkCMakeLists.txtLOCAL_SRC_FILES += ByNameModding/BNM.cpp
add_library("Your lib name" SHARED ByNameModding/BNM.cpp "...other cpp files")
- Change
UNITY_VER
, include your string obfuscator and hooking software, uncommentBNM_DOTNET35
if the game uses .NET 3.5 in BNM_settings.hpp - Done! See Examples.cpp or add it to your project to understand how to work with BNM.
UTF8-CPP used by il2cpp and by BNM too.
Dobby - recomended
Substrate with And64InlineHook - may don't work