👾
IL2CPP Resolver
  • Overview
  • 📦GameObject
    • Find with substring
    • Obtaining list
    • Obtaining Component list
  • 🛠️Utils
    • Usage of field offsets
    • Fetching & filtering classes
    • Fetching class method
  • 🔄Callback
    • OnUpdate
Powered by GitBook
On this page
  • Via name:
  • Via pre-cached SystemType:
  • Looping through list:

Was this helpful?

  1. GameObject

Obtaining list

Via name:

Unity::il2cppArray<Unity::CGameObject*>* m_pObjects = Unity::Object::FindObjectsOfType<Unity::CGameObject*>("UnityEngine.GameObject");

Via pre-cached SystemType:

Unity:il2cppObject* m_pSystemType = nullptr;

void InitSystemTypes()
{
    Unity::il2cppClass* m_pSystemTypeClass = IL2CPP::Class::Find("UnityEngine.GameObject");
    m_pSystemType = IL2CPP::Class::GetSystemType(m_pSystemTypeClass);
}

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

Looping through list:

for (uintptr_t u = 0U; m_pObjects->m_uMaxLength > u; ++u)
{
    Unity::CGameObject* m_pObject = m_pObjects->m_pArray[u];
}
PreviousFind with substringNextObtaining Component list

Last updated 3 years ago

Was this helpful?

📦