Wrong class without il2cpp perform
commonuserlol opened this issue · comments
const core = Il2Cpp.domain.assembly("UnityEngine.CoreModule").image;
const vec3 = core.class("UnityEngine.Vector3");
const pos = vec3.alloc();
console.log(vec3.name) // "Vector3"
console.log(pos.toString()) // "UnityEngine.Coroutine"
with Il2Cpp.perform
it correctly creates new vector3, but why without it does this?
Interesting! I don't know 😄 Perhaps you are executing the code way too early: Il2Cpp::perform
ensures everything is ready just before executing the given callback