Raicuparta / uuvr

Universal VR mod for Unity games
https://raicuparta.com/rai-pal
GNU General Public License v3.0
84 stars 6 forks source link

UUVR injection incompatible with Unity engines earlier than 5.4.0 #25

Closed squidge-in-the-fridge closed 1 month ago

squidge-in-the-fridge commented 2 months ago

When launching a game made with a Unity version prior to 5.4.0, the game will not launch in VR mode, and prints this error to the BepinEx console:

[Error  : Unity Log] MissingMethodException: Method not found: 'UnityEngine.Application.add_onBeforeRender'.
Stack trace:
UnityEngine.GameObject:AddComponent()
Uuvr.UuvrBehaviour:Create(Transform)
Uuvr.UuvrCore:Start()

I've tried this with the games Clustertruck (running on Mono 5.3.4f1) and Ratz Instagib 2.0 (running on Mono 4.7.2f1). Presumably this is because the add_onBeforeRender method doesn't exist until 5.4.0

Raicuparta commented 1 month ago

The onBeforeRender thing might be an issue for a few games, but for the majority they wouldn't work at all with UUVR, so I just need to change the manifest so the minimum version is 5.something (probably 5.6, need to check).

squidge-in-the-fridge commented 1 month ago

Gotcha, I'll try VRGIN for earlier Unity versions 👍