File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 60
60
#include < string>
61
61
#include < unordered_map>
62
62
#include < vector>
63
- #include < functional>
63
+ #include < functional>
64
64
#include < numbers>
65
65
66
66
#ifdef USE_GLM
@@ -2381,6 +2381,20 @@ class UnityResolve final {
2381
2381
if (method) return method->Invoke <Matrix4x4>(this );
2382
2382
return {};
2383
2383
}
2384
+
2385
+
2386
+ auto ScreenPointToRay (const Vector2 &position, const Eye eye = Eye::Mono) -> Ray {
2387
+
2388
+ static Method *method;
2389
+ if (!method) method = Get (" UnityEngine.CoreModule.dll" )->Get (" Camera" )->Get <Method>(mode_ == Mode::Mono ? " ScreenPointToRay_Injected" : " ScreenPointToRay" );
2390
+ if (mode_ == Mode::Mono && method) {
2391
+ Ray ray{};
2392
+ method->Invoke <void >(this , position, eye, &ray);
2393
+ return ray;
2394
+ }
2395
+ if (method) return method->Invoke <Ray>(this , position, eye);
2396
+ return {};
2397
+ }
2384
2398
};
2385
2399
2386
2400
struct Transform : Component {
You can’t perform that action at this time.
0 commit comments