Skip to content

Commit f876134

Browse files
author
lawwong
committed
Update to v1.20.2
* Changes - Add support for Unity 6 - Fix compile errors & warnnings - Add support for VIVE OpenXR Unity SDK - Now support hand tracking thru Unity XR Hand - Goto PackageManager > install "XR Hands" (com.unity.xr.hands) - Goto ProjectSettings > XR Plug-in Management > OpenXR > Enabled Interaction Profiles > add "VIVE XR Hand Interaction" - Goto ProjectSettings > XR Plug-in Management > OpenXR > OpenXR Feature Groups > enable "Hand Tracking Subsystem" - Tracked hand will identify as VRModuleDeviceModel.UnityXRHandRight/Left - Add support for latest Wave XR plugin - Fix selecting wrong left/right device in some cases - Add support for latest Oculus plugin - Fix tracked hand model not working * Bug Fix - Fix grabber(ColliderEventCaster) emitting incorrect button
2 parents 65f1b03 + 28700d9 commit f876134

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/VIUSyntheticDevice.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,19 @@ public VIUSyntheticDevice GetDevice(int roleValue)
209209

210210
private VIUSyntheticDevice AddDevice(ViveRole.IMap map, int roleValue)
211211
{
212-
VIUSyntheticDevice device;
213212
try
214213
{
215-
device = InputSystem.AddDevice(new InputDeviceDescription()
214+
var device = InputSystem.AddDevice(new InputDeviceDescription()
216215
{
217216
interfaceName = layoutName,
218217
manufacturer = "HTC ViveSoftware",
219218
}) as VIUSyntheticDevice;
219+
220+
if (device == null)
221+
{
222+
Debug.LogError("[VIUSyntheticDevice] InputSystem.AddDevice(InputDeviceDescription) failed!");
223+
return null;
224+
}
220225

221226
InputSystem.AddDeviceUsage(device, map.RoleValueInfo.GetNameByRoleValue(roleValue));
222227
if (leftRgx.IsMatch(layoutName))
@@ -227,14 +232,15 @@ private VIUSyntheticDevice AddDevice(ViveRole.IMap map, int roleValue)
227232
{
228233
InputSystem.AddDeviceUsage(device, CommonUsages.RightHand);
229234
}
235+
236+
device.ctrlState = ViveInput.GetState(map.RoleValueInfo.RoleEnumType, roleValue);
237+
return device;
230238
}
231239
catch (Exception e)
232240
{
233241
Debug.LogException(e);
234242
return null;
235243
}
236-
device.ctrlState = ViveInput.GetState(map.RoleValueInfo.RoleEnumType, roleValue);
237-
return device;
238244
}
239245

240246
private static void ResumeDevice(InputDevice device)

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/VIUVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ namespace HTC.UnityPlugin.Vive
66
{
77
public static class VIUVersion
88
{
9-
public static readonly Version current = new Version("1.20.1.0");
9+
public static readonly Version current = new Version("1.20.2.0");
1010
}
1111
}

Assets/HTC.UnityPlugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.htc.upm.vive-input-utility",
3-
"version": "1.20.1",
3+
"version": "1.20.2",
44
"displayName": "VIVE Input Utility",
55
"description": "The VIVE Input Utility (VIU) is a toolkit for developing VR experiences in Unity, especially with the VIVE/VIVE Pro but also targeting many platforms from a common code base including Oculus Rift, Rift S Go, Quest, Google Daydream, VIVE Wave SDK (e.g. VIVE Focus standalone) and additional VR platforms as supported by Unity such as Microsoft's 'Mixed Reality' VR headsets and more.\n\nCompatible with SteamVR 2.4.0+ and Oculus Integration 16.0+.\n\nView license:\nhttps://github.com/ViveSoftware/ViveInputUtility-Unity/blob/develop/LICENSE.md",
66
"keywords": [

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Vive Input Utility for Unity - v1.20.1
1+
# Vive Input Utility for Unity - v1.20.2
22
Copyright (c) 2016-2024, HTC Corporation. All rights reserved.
33

44

5-
## Changes for v1.20.1:
5+
## Changes for v1.20.2:
66

77
* Changes
88
- Add support for Unity 6

0 commit comments

Comments
 (0)