Skip to content

Commit

Permalink
Update to v1.20.2
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
lawwong committed Dec 2, 2024
2 parents 65f1b03 + 28700d9 commit f876134
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,19 @@ public VIUSyntheticDevice GetDevice(int roleValue)

private VIUSyntheticDevice AddDevice(ViveRole.IMap map, int roleValue)
{
VIUSyntheticDevice device;
try
{
device = InputSystem.AddDevice(new InputDeviceDescription()
var device = InputSystem.AddDevice(new InputDeviceDescription()
{
interfaceName = layoutName,
manufacturer = "HTC ViveSoftware",
}) as VIUSyntheticDevice;

if (device == null)
{
Debug.LogError("[VIUSyntheticDevice] InputSystem.AddDevice(InputDeviceDescription) failed!");
return null;
}

InputSystem.AddDeviceUsage(device, map.RoleValueInfo.GetNameByRoleValue(roleValue));
if (leftRgx.IsMatch(layoutName))
Expand All @@ -227,14 +232,15 @@ private VIUSyntheticDevice AddDevice(ViveRole.IMap map, int roleValue)
{
InputSystem.AddDeviceUsage(device, CommonUsages.RightHand);
}

device.ctrlState = ViveInput.GetState(map.RoleValueInfo.RoleEnumType, roleValue);
return device;
}
catch (Exception e)
{
Debug.LogException(e);
return null;
}
device.ctrlState = ViveInput.GetState(map.RoleValueInfo.RoleEnumType, roleValue);
return device;
}

private static void ResumeDevice(InputDevice device)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ namespace HTC.UnityPlugin.Vive
{
public static class VIUVersion
{
public static readonly Version current = new Version("1.20.1.0");
public static readonly Version current = new Version("1.20.2.0");
}
}
2 changes: 1 addition & 1 deletion Assets/HTC.UnityPlugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.htc.upm.vive-input-utility",
"version": "1.20.1",
"version": "1.20.2",
"displayName": "VIVE Input Utility",
"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",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Vive Input Utility for Unity - v1.20.1
# Vive Input Utility for Unity - v1.20.2
Copyright (c) 2016-2024, HTC Corporation. All rights reserved.


## Changes for v1.20.1:
## Changes for v1.20.2:

* Changes
- Add support for Unity 6
Expand Down

0 comments on commit f876134

Please sign in to comment.