unity-xr-plugin icon indicating copy to clipboard operation
unity-xr-plugin copied to clipboard

Adding plugin removes button/trigger inputs from ALL headset hardware

Open GabrielHare opened this issue 3 years ago • 1 comments

Setup:

  • Enabled XR Plug-in Manager
  • Enabled Oculus support & verified
  • Enabled Windows Mixed Reality support & verified
  • Imported OpenVR Unity-XR-Plugin only. (The SteamVR Unity plugin was not installed.)

Problem: Joystick and button inputs do not work using any headset hardware. When accessed through the legacy input manager joysticks return 0 state. When features are listed for devices tracking data is listed but buttons and triggers no longer are present. Reverting project to state before OpenVR was imported resorted functionality.

Related Issue?: When OpenVR is imported it always launches SteamVR and logs an error (not a warning like the other platforms) if no headset is connected. Related Question: If an Oculus or Windows MR headset is used, is this mediated by the OpenVR support?

NOTE: I have not tested what happens in an environment WITHOUT SteamVR installed. Hopefully the application launches and quits without errors...

Tested with: No headset, Valve Index SteamVR, Samsung Odyssey Windows MR, Quest using link to Oculus desktop Unity XR Plugin release v1.1.4 Unity 2019.4.36f1 Windows 10 Pro Version 10.0.19044 Build 19044 Alienware M17, Intel i7-9750H, GeForce 2060

GabrielHare avatar Apr 09 '22 06:04 GabrielHare

Solved (sort-of)! This might be a "feature" but since the issue was encountered as a "bug" please consider this to be "bug report" for the documentation.

The OpenVR Loader seems to prioritize SteamVR use. And, SteamVR does not provide inputs through XR module or through the legacy Input Manager.

To work around this, use the SteamVR plugin for ALL headsets.

  • In 'Project Settings > XR Plug-in Management' disable all Plug-in providers except to OpenVR Loader.
  • Import the SteamVR Unity Plugin in addition to the OpenVR Unity Plugin.
  • Oculus users will have to install SteamVR.
  • Windows Mixed Reality users will have to install SteamVR and Windows Mixed Reality for SteamVR.

Bonus: SteamVR comes with nicely animated controllers for all of the headsets.

GabrielHare avatar Apr 09 '22 23:04 GabrielHare