This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! Unity GameObject Ptr (m_CachedPtr)

Kaorin333

Solid & Active Platinian
C++:
UnityEngine_GameObject_o (*old_getgameObject)(void* instance);
UnityEngine_GameObject_o getgameObject(void* instance) {
   
    if (instance != NULL) {
        UnityEngine_GameObject_o game = old_Get_gameObject(instance);
        LOGI("GameObject: %p", game.fields.m_CachedPtr);
    }
   
    return old_getgameObject(instance);
}

Is it possible to access this ptr ? If yes how and is it useful?

Thank you.