The unity game I'm modding has a class called MonoSingleton which contains a method get_Instance() which will return the instance of whatever type is passed through:
I have used Il2CPPInspector to generate the following code:
There are a lot more of these, and each one containing get_Instance() points to 0x00EE7014
So I'm guessing I have to pass a pointer to MethodInfo to this generic function in order to retrieve what I want, but I'm unsure how I get the instance of MethodInfo that I need
This is what I've tried to far but with no success:
I have used Il2CPPInspector to generate the following code:
C++:
DO_APP_FUNC(0x00EE7014, PlayerDataManager *, MonoSingleton_1_PlayerDataManager__get_Instance, (MethodInfo * method));
DO_APP_FUNC_METHODINFO(0x0278F028, MonoSingleton_1_PlayerDataManager__get_Instance__MethodInfo);
So I'm guessing I have to pass a pointer to MethodInfo to this generic function in order to retrieve what I want, but I'm unsure how I get the instance of MethodInfo that I need
This is what I've tried to far but with no success:
C++:
GetInstance = (void*(*)(void *))getAbsoluteAddress(targetLibName, 0x00EE7014);
C++:
void* pdm = GetInstance((void*)getAbsoluteAddress(targetLibName, 0x0278F028));
if(pdm) {
AddGem(pdm, 1000, nullptr, nullptr);
}