ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
352 stars 82 forks source link

SteamVR 2.2 + VIU 1.10.3.0 controller binding example blows up #100

Closed wirelessdreamer closed 5 years ago

wirelessdreamer commented 5 years ago

SteamVR unity plugin: 2.2 SteamVR Beta 1.3.7 VIU unity plugin: 1.10.3.0 Unity: 2019.2.0a6 Hardware: Vive Pro + 1.0 base stations + Knuckles

set up a fresh project, import SteamVR 2.2 and VIU 1.10.3.0 (current release for both)

open example 7, on play the error below shows up, and when you click on add device, no devices show up in selection dialog.

image

chengnay commented 5 years ago

@wirelessdreamer You can have a quick fix by adding a line of code to your project.

In Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/ViveRole/RoleMaps/BodyRole.cs, Line 58, UnmappingAll();

_if (!VRModule.IsValidDeviceIndex(VRModule.HMD_DEVICEINDEX)) { return; } <--- Add this line

MappingRoleIfUnbound(BodyRole.Head, 0u);

wirelessdreamer commented 5 years ago

That fixed it. Thanks. Feel free to re open this if you need it to track the bug for later.