sneakyevil / IL2CPP_Resolver

A run-time API resolver for IL2CPP Unity.
https://sneakyevil.gitbook.io/il2cpp-resolver/
The Unlicense
323 stars 65 forks source link

x86 functionality #27

Closed Glatrix closed 1 year ago

Glatrix commented 1 year ago

Some quick fixes for making callbacks and API functions work on both x64 and x86.

Used preprocessor to determine the calling conventions at compile time. (see Defines.hpp and Unity/Defines.hpp)

edit: Just tested OnUpdate with Phasmophobia (x64) and Among Us (x86). Both worked with no problems.

sneakyevil commented 1 year ago

Removing the VFunc.hpp util which is used to ensure that the il2cpp resolver always finds the desired func no matter if they update the MonoBehaviour class and add new vfunc is just bad idea. If you rewrite it with the asm search I'll pull the request.

Glatrix commented 1 year ago

Removing the VFunc.hpp util which is used to ensure that the il2cpp resolver always finds the desired func no matter if they update the MonoBehaviour class and add new vfunc is just bad idea. If you rewrite it with the asm search I'll pull the request.

Ok I re added it, should be good to go

Unless you think I should add fixed update. itd be a pretty quick addition