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

Game Crashes at GetName function #49

Closed Lessyzz closed 3 weeks ago

Lessyzz commented 2 months ago

What is the game you are using with IL2CPP Resolver?

My Own Game

Details:

When I run this code The game crashes when the GetName function runs any idea?

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

Unity::il2cppArray<Unity::CGameObject*>* m_pObjects = Unity::Object::FindObjectsOfType<Unity::CGameObject>(UNITY_GAMEOBJECT_CLASS);

    for (uintptr_t u = 0U; m_pObjects->m_uMaxLength > u; ++u)
    {
        Unity::CGameObject* m_pObject = m_pObjects->m_pValues[u];
        if (!m_pObject) continue;

        cout << m_pObject->GetName();
    }
extremeblackliu commented 1 month ago

https://github.com/sneakyevil/IL2CPP_Resolver/issues/48#issuecomment-2119261191

extremeblackliu commented 3 weeks ago

closed for duplicate, please talk on #48