👾
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 Component list

You must have valid GameObject pointer.

Via name:

Unity::il2cppArray<Unity::CComponent*>* m_pComponents = m_pObject->GetComponents("UnityEngine.Component");

Via pre-cached SystemType:

Unity:il2cppObject* m_pSystemType = nullptr;

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

Unity::il2cppArray<Unity::CComponent*>* m_pComponents = m_pObject->GetComponents(m_pSystemType);

Looping through list:

for (uintptr_t u = 0U; m_pComponents->m_uMaxLength > u; ++u)
{
    Unity::CComponent* m_pComponent = m_pComponents->m_pArray[u];
}
PreviousObtaining listNextUsage of field offsets

Last updated 3 years ago

Was this helpful?

📦