Closed netonjm closed 8 months ago
Using the user32 wrapper was actually by design. Because there are at least two different Input methods for Unity, so trying to access the Input class in some modern games would actually make it crash, since that class may not be present. In general, the least we depend on Unity APIs, the easier it is to keep the mod working consistently across Unity versions.
It can also be tricky for older games where the Unity API is slightly different. This is something I faced in another universal mod, but I'm not sure if that will matter much for UUVR, since this mod is unlikely to ever work on very old Unity versions anyway.
So if there is some reason to implement this change, we'd always need to either do a bunch of checks to see the correct way to check for input, or just fall back to the user32 wrapper if the Input class isn't available.
Is there something in particular you're trying to fix with this change?
Gotcha and thanks for the explanation. I didn't know about the old compatibility issue, then make sense to close this PR.
Use Unity Default Input API instead user32 wrapper