sneakyevil / IL2CPP_Resolver

A run-time API resolver for IL2CPP Unity.
https://sneakyevil.gitbook.io/il2cpp-resolver/
The Unlicense
323 stars 65 forks source link

Better W2S Function name? (Not fully tested) #22

Closed Glatrix closed 1 year ago

Glatrix commented 1 year ago

Seems "UnityEngine.Camera::WorldToScreenPoint_Injected(UnityEngine.Vec" might be a better alternative, only requiring a Vector3 as a parameter. il2cpp_resolve_icall("UnityEngine.Camera::WorldToScreenPoint_Injected(UnityEngine.Vec"); would be used like UnityEngine.Camera::WorldToScreenPoint_Injected(this,UnityEngine.Vector3 m_vec);

Seems the resolve icall functionality supports slightly different names for method overloads.

sneakyevil commented 1 year ago

There is nothing better comparing to already used method which allows you to even world to screen under different VR Eye. Can't tell about performance wise but I think it will be similar besides small bit of performance hit on the compression of the eye value. Maybe it will be just wrapper of already used method with just hardcoded eye value. You could easily check unityplayer.dll inside ida. You can get pdb file for UnityPlayer.dll somewhere and use it to check exactly what the function does.