knah / Il2CppAssemblyUnhollower

A tool to generate Managed->IL2CPP proxy assemblies
GNU Lesser General Public License v3.0
503 stars 87 forks source link

Pointer types try to construct pointer(intptr), which does not exist. #88

Open yretenai opened 2 years ago

yretenai commented 2 years ago

At the moment, when trying to access any value that is an unsafe pointer (i.e. int*), unhollower tries to construct the return value as int*(intptr), which fails because there is no constructor for int*

The workaround I have made is to get the raw il2cpp pointer manually and dereference the Intptr as the pointer type, I do not fully comprehend the implications of this as I assume the intptr constructor is used for GC. I am unsure if this is required for a raw intptr value, or if any boxing/unboxing is required.