ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.04k stars 259 forks source link

Vive Tracker not working with XR Plugin #761

Open gribugr opened 4 years ago

gribugr commented 4 years ago

Hi,

Exploring Unity XR SDK, I've came across the following problem: one of my Vive trackers (model_number: Vive Tracker MV, htcComposeTime: 2017-04-05 10:43:01.844000) does not appear in the InputDevices list even though it displays correctly in SteamVR Plugin. In addition, when exiting the application with the tracker connected, the following exception occurs:

[XRInputSubsystem] A device disconnection with the id 3 has been reported but no device with that id was connected.
UnityEngine.XR.Management.XRLoaderHelper:StopSubsystem()
Unity.XR.OpenVR.OpenVRLoader:Stop() (at Library/PackageCache/com.valve.openvr@dcd8923d94/Runtime/OpenVRLoader.cs:241)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

The newer version of the Vive tracker (model_number: VIVE Tracker Pro MV, htcComposeTime: 2019-02-14 23:57:48.952000) works fine and and there are no such problems

Unity 2019.3.13f1 SteamVR 1.12.5

charlicopter commented 4 years ago

Can confirm. Using OG Vive trackers and Vive HMD:

If trackers are OFF before hitting "play" in Unity, and then turned ON while playing, then: => Trackers are not detected; Unity throws error: [XRInputSubsystem] A device disconnection with the id 3 has been reported but no device with that id was connected. -With the tracker still ON, when stopping the player, Unity throws the error: [XRInputSubsystem] A device disconnection with the id 3 has been reported but no device with that id was connected. UnityEngine.XR.Management.XRLoaderHelper:StopSubsystem() Unity.XR.OpenVR.OpenVRLoader:Stop() (at Library/PackageCache/com.valve.openvr@db9e35089d/Runtime/OpenVRLoader.cs:241) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

If trackers are ON before hitting "play" in Unity, then: => Trackers are not detected; => With the tracker still ON, when stopping the player, Unity throws the error: [XRInputSubsystem] A device disconnection with the id 3 has been reported but no device with that id was connected. UnityEngine.XR.Management.XRLoaderHelper:StopSubsystem() Unity.XR.OpenVR.OpenVRLoader:Stop() (at Library/PackageCache/com.valve.openvr@db9e35089d/Runtime/OpenVRLoader.cs:241) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

If the tracker is switched OFF during runtime, Unity throws error: [XRInputSubsystem] A device disconnection with the id 3 has been reported but no device with that id was connected.