sneakyevil / IL2CPP_Resolver

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

this program not support x64 applications #20

Closed flymoon1981 closed 2 years ago

flymoon1981 commented 2 years ago

My English is poor, does this program not support x64 applications? injected x64 into the game to run It just collapsed

sneakyevil commented 2 years ago

This project is mainly done for x64 (64-bit) applications. Simply attach debugger and check what is happening.

Alluseri commented 2 years ago

That begs the question: are you even using it properly? Simply C+P'ing the Quick Example most likely won't work for whatever game you're trying to hack.

flymoon1981 commented 2 years ago

First of all, thank you for your guidance! Maybe I used it incorrectly! It is found that the program crashes after running il2cpp:: class:: find,I'll try again

flymoon1981 commented 2 years ago

IL2CPP::Initialize(); // Obtain list Unity::il2cppArray<Unity::CGameObject> m_pObjects = Unity::Object::FindObjectsOfType(UNITY_GAMEOBJECT_CLASS);

// Looping through list for (uintptr_t u = 0U; m_pObjects->m_uMaxLength > u; ++u) { Unity::CGameObject* m_pObject = m_pObjects->m_pValues[u]; if (!m_pObject) continue; // Just in-case

// Obtaining object name and then converting it to std::string
std::string m_sObjectName = m_pObject->GetName()->ToString();

}

When I run this code, the program crashes. Now I don't know why

sneakyevil commented 2 years ago

You're trying to run il2cpp functions outside il2cpp thread, read docs and register your own OnUpdate function and run your stuff there.