From 8c0baa899ce4701ff5631f5fada705a8e0e5a97d Mon Sep 17 00:00:00 2001 From: Andy_YC_Chen Date: Mon, 26 Jun 2023 16:37:49 +0800 Subject: [PATCH] Update package file to 1.0.13 --- com.htc.upm.vive.openxr/CHANGELOG.md | 7 ++++++- .../Runtime/input/Features/HtcViveCosmosInputFeature.cs | 9 ++++++--- .../OpenXRFacialTracking/Samples~/Readme.md | 2 +- .../Runtime/input/Features/HtcViveFocus3InputFeature.cs | 4 ++++ .../input/Features/HtcViveHandInteractionInputFeature.cs | 4 ++++ .../OpenXRHandTracking/Samples~/Readme.md | 2 +- .../OpenXRHandTracking/Samples~/Scripts/InputMaster.cs | 2 +- .../OpenXRHandTracking/Samples~/Scripts/LineRender.cs | 7 ++++++- .../Samples~/PassThrough Plugin/EnablePassThrough_cmd.cs | 2 +- .../OpenXRSceneUnderstanding/Samples~/Readme.md | 2 +- com.htc.upm.vive.openxr/package.json | 2 +- 11 files changed, 32 insertions(+), 11 deletions(-) diff --git a/com.htc.upm.vive.openxr/CHANGELOG.md b/com.htc.upm.vive.openxr/CHANGELOG.md index 7c8a4e3..bf35e62 100644 --- a/com.htc.upm.vive.openxr/CHANGELOG.md +++ b/com.htc.upm.vive.openxr/CHANGELOG.md @@ -1,4 +1,4 @@ -# **VIVE OpenXR Plugin - Windows** For Unity - v1.0.12 +# **VIVE OpenXR Plugin - Windows** For Unity - v1.0.13 Copyright HTC Corporation. All Rights Reserved. **VIVE OpenXR Plugin - Windows**: This plugin provides support for openxr based on the following specifications. @@ -10,6 +10,11 @@ Copyright HTC Corporation. All Rights Reserved. - [Hand Interaction](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_HTC_hand_interaction) - [Palm pose](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_palm_pose) --- +## Changes for v1.0.13 - 2023/06/26 + - Fix problem that "OpenXR.Input.PoseControl" and "OpenXR.Input.Pose" are deprecated after OpenXR Plugin 1.6.0. + 1. When **USE_INPUT_SYSTEM_POSE_CONTROL** is defined, switch to use InputSystem.XR.PoseControl; otherwise, use OpenXR.Input.PoseControl for backward compatibility. + 2. When **USE_INPUT_SYSTEM_POSE_CONTROL** is defined, switch to use InputSystem.XR.PoseState; otherwise, use OpenXR.Input.Pose for backward compatibility. + ## Changes for v1.0.12 - 2023/06/02 - Remove Eye gaze sample.It is recommended to use the Controller sample provided by the Unity OpenXR Plugin to test eye gaze. diff --git a/com.htc.upm.vive.openxr/OpenXRCosmosController/Runtime/input/Features/HtcViveCosmosInputFeature.cs b/com.htc.upm.vive.openxr/OpenXRCosmosController/Runtime/input/Features/HtcViveCosmosInputFeature.cs index 1430691..f3fc540 100644 --- a/com.htc.upm.vive.openxr/OpenXRCosmosController/Runtime/input/Features/HtcViveCosmosInputFeature.cs +++ b/com.htc.upm.vive.openxr/OpenXRCosmosController/Runtime/input/Features/HtcViveCosmosInputFeature.cs @@ -9,15 +9,18 @@ using UnityEngine.InputSystem.XR; using UnityEditor; #endif +#if USE_INPUT_SYSTEM_POSE_CONTROL +using PoseControl = UnityEngine.InputSystem.XR.PoseControl; +#else using PoseControl = UnityEngine.XR.OpenXR.Input.PoseControl; - - +#endif + namespace UnityEngine.XR.OpenXR.Features { /// /// This enables the use of HTC Vive Controllers interaction profiles in OpenXR. /// -#if UNITY_EDITOR +#if UNITY_EDITOR [UnityEditor.XR.OpenXR.Features.OpenXRFeature(UiName = "HTC Vive Cosmos Controller Support", BuildTargetGroups = new[] { BuildTargetGroup.Standalone, BuildTargetGroup.WSA }, Company = "HTC", diff --git a/com.htc.upm.vive.openxr/OpenXRFacialTracking/Samples~/Readme.md b/com.htc.upm.vive.openxr/OpenXRFacialTracking/Samples~/Readme.md index 2b32797..d2abb1a 100644 --- a/com.htc.upm.vive.openxr/OpenXRFacialTracking/Samples~/Readme.md +++ b/com.htc.upm.vive.openxr/OpenXRFacialTracking/Samples~/Readme.md @@ -9,7 +9,7 @@ To help software developers create an application with actual facial expressions 1. **Edit** > **Project Settings** > **XR Plug-in Management** > Select **OpenXR** , click Exclamation mark next to it then choose **Fix All**. 2. **Edit** > **Project Settings** > **XR Plug-in Management** > **OpenXR** > Add Interaction profiles for your device. 3. **Edit** > **Project Settings** > **XR Plug-in Management** > **OpenXR** > Select **Facial Tracking** under **VIVE OpenXR** Feature Groups. -4. In the Unity Project window, select the sample scene file in **Assets** > **Samples** > **VIVE OpenXR Plugin - Windows** > **1.0.12** > **FacialTracking Example** > **Scenes** > **FaceSample.unity** then click Play. +4. In the Unity Project window, select the sample scene file in **Assets** > **Samples** > **VIVE OpenXR Plugin - Windows** > **1.0.13** > **FacialTracking Example** > **Scenes** > **FaceSample.unity** then click Play. ## How to use VIVE OpenXR Facial Tracking Unity Feature 1. Import VIVE OpenXR Plugin - Windows diff --git a/com.htc.upm.vive.openxr/OpenXRFocus3Controller/Runtime/input/Features/HtcViveFocus3InputFeature.cs b/com.htc.upm.vive.openxr/OpenXRFocus3Controller/Runtime/input/Features/HtcViveFocus3InputFeature.cs index f5303cd..c5c975f 100644 --- a/com.htc.upm.vive.openxr/OpenXRFocus3Controller/Runtime/input/Features/HtcViveFocus3InputFeature.cs +++ b/com.htc.upm.vive.openxr/OpenXRFocus3Controller/Runtime/input/Features/HtcViveFocus3InputFeature.cs @@ -9,7 +9,11 @@ using UnityEngine.XR.OpenXR.Input; using UnityEditor; #endif +#if USE_INPUT_SYSTEM_POSE_CONTROL +using PoseControl = UnityEngine.InputSystem.XR.PoseControl; +#else using PoseControl = UnityEngine.XR.OpenXR.Input.PoseControl; +#endif namespace UnityEngine.XR.OpenXR.Features { diff --git a/com.htc.upm.vive.openxr/OpenXRHandInteractionProfiler/Runtime/input/Features/HtcViveHandInteractionInputFeature.cs b/com.htc.upm.vive.openxr/OpenXRHandInteractionProfiler/Runtime/input/Features/HtcViveHandInteractionInputFeature.cs index 56e178b..30c0924 100644 --- a/com.htc.upm.vive.openxr/OpenXRHandInteractionProfiler/Runtime/input/Features/HtcViveHandInteractionInputFeature.cs +++ b/com.htc.upm.vive.openxr/OpenXRHandInteractionProfiler/Runtime/input/Features/HtcViveHandInteractionInputFeature.cs @@ -9,7 +9,11 @@ using UnityEngine.XR.OpenXR.Input; using UnityEditor; #endif +#if USE_INPUT_SYSTEM_POSE_CONTROL +using PoseControl = UnityEngine.InputSystem.XR.PoseControl; +#else using PoseControl = UnityEngine.XR.OpenXR.Input.PoseControl; +#endif namespace UnityEngine.XR.OpenXR.Features { diff --git a/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Readme.md b/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Readme.md index f0b9826..9ea49c2 100644 --- a/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Readme.md +++ b/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Readme.md @@ -9,7 +9,7 @@ To help software developers create an application for locating hand joints with 1. **Edit** > **Project Settings** > **XR Plug-in Management** > Select **OpenXR** , click Exclamation mark next to it then choose **Fix All**. 2. **Edit** > **Project Settings** > **XR Plug-in Management** > **OpenXR** > Add Interaction profiles for your device. 3. **Edit** > **Project Settings** > **XR Plug-in Management** > **OpenXR** > Select **Hand Tracking** under **VIVE OpenXR** Feature Groups. -4. In the Unity Project window, select the sample scene file in **Assets** > **Samples** > **VIVE OpenXR Plugin - Windows** > **1.0.12** > **HandTracking Example** > **Scenes** > **HandTrackingScene.unity** then click Play. +4. In the Unity Project window, select the sample scene file in **Assets** > **Samples** > **VIVE OpenXR Plugin - Windows** > **1.0.13** > **HandTracking Example** > **Scenes** > **HandTrackingScene.unity** then click Play. ## Use VIVE OpenXR Hand Tracking Unity Feature to draw skeleton hand. 1. Import VIVE OpenXR Plugin - Windows diff --git a/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Scripts/InputMaster.cs b/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Scripts/InputMaster.cs index 730dc48..0877392 100644 --- a/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Scripts/InputMaster.cs +++ b/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Scripts/InputMaster.cs @@ -2,7 +2,7 @@ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator // version 1.4.1 -// from Assets/Samples/VIVE OpenXR Plugin - Windows/1.0.12/HandTracking Example/Scripts/InputMaster.inputactions +// from Assets/Samples/VIVE OpenXR Plugin - Windows/1.0.13/HandTracking Example/Scripts/InputMaster.inputactions // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Scripts/LineRender.cs b/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Scripts/LineRender.cs index e2c5d21..ca182c2 100644 --- a/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Scripts/LineRender.cs +++ b/com.htc.upm.vive.openxr/OpenXRHandTracking/Samples~/Scripts/LineRender.cs @@ -3,6 +3,11 @@ using UnityEngine.InputSystem; using UnityEngine.UI; using UnityEngine; +#if USE_INPUT_SYSTEM_POSE_CONTROL +using Pose = UnityEngine.InputSystem.XR.PoseState; +#else +using Pose = UnityEngine.XR.OpenXR.Input.Pose; +#endif public class LineRender : MonoBehaviour { @@ -22,7 +27,7 @@ public class LineRender : MonoBehaviour && actionReferencePose.action.enabled && actionReferencePose.action.controls.Count > 0) { //GazeRayRenderer.SetActive(true); - UnityEngine.XR.OpenXR.Input.Pose poseval = actionReferencePose.action.ReadValue(); + Pose poseval = actionReferencePose.action.ReadValue(); Quaternion gazeRotation = poseval.rotation; Quaternion orientation = new Quaternion( 1 * (gazeRotation.x), diff --git a/com.htc.upm.vive.openxr/OpenXRSceneUnderstanding/Samples~/PassThrough Plugin/EnablePassThrough_cmd.cs b/com.htc.upm.vive.openxr/OpenXRSceneUnderstanding/Samples~/PassThrough Plugin/EnablePassThrough_cmd.cs index 8ddbfc7..8984adf 100644 --- a/com.htc.upm.vive.openxr/OpenXRSceneUnderstanding/Samples~/PassThrough Plugin/EnablePassThrough_cmd.cs +++ b/com.htc.upm.vive.openxr/OpenXRSceneUnderstanding/Samples~/PassThrough Plugin/EnablePassThrough_cmd.cs @@ -13,7 +13,7 @@ public class EnablePassThrough_cmd : MonoBehaviour // Start is called before the first frame update private void Awake() { #if UNITY_EDITOR - path = System.IO.Path.Combine(Directory.GetCurrentDirectory() + "\\Assets\\Samples\\VIVE OpenXR Plugin - Windows\\1.0.12\\SceneUnderstanding Example\\PassThrough Plugin\\OfflineTool.exe"); + path = System.IO.Path.Combine(Directory.GetCurrentDirectory() + "\\Assets\\Samples\\VIVE OpenXR Plugin - Windows\\1.0.13\\SceneUnderstanding Example\\PassThrough Plugin\\OfflineTool.exe"); #elif UNITY_STANDALONE path = System.IO.Path.Combine(Directory.GetCurrentDirectory() + "/OfflineTool.exe"); #endif diff --git a/com.htc.upm.vive.openxr/OpenXRSceneUnderstanding/Samples~/Readme.md b/com.htc.upm.vive.openxr/OpenXRSceneUnderstanding/Samples~/Readme.md index 712bed2..1120fc8 100644 --- a/com.htc.upm.vive.openxr/OpenXRSceneUnderstanding/Samples~/Readme.md +++ b/com.htc.upm.vive.openxr/OpenXRSceneUnderstanding/Samples~/Readme.md @@ -8,7 +8,7 @@ Demonstrate configuring, calculating and generating mesh of surrounding environm 1. **Edit** > **Project Settings** > **XR Plug-in Management** > Select **OpenXR** , click Exclamation mark next to it > choose **Fix All**. 2. **Edit** > **Project Settings** > **XR Plug-in Management** > **OpenXR** > Add Interaction profiles for your device. 3. **Edit** > **Project Settings** > **XR Plug-in Management** > **OpenXR** > Select **Scene UnderStanding** and **Meshing Subsystem** under **VIVE OpenXR** Feature Groups. -4. In the Unity Project window, select the sample scene file in **Assets** > **Samples** > **VIVE OpenXR Plugin - Windows** > **1.0.12** > **SceneUnderstanding Example** > **Meshing Subsystem Feature** > **MeshingFeature.unity** then click Play. +4. In the Unity Project window, select the sample scene file in **Assets** > **Samples** > **VIVE OpenXR Plugin - Windows** > **1.0.13** > **SceneUnderstanding Example** > **Meshing Subsystem Feature** > **MeshingFeature.unity** then click Play. ## How to use VIVE OpenXR SceneUnderstanding Unity Feature For the available OpenXR SceneUnderstanding functions, please refer to **SceneUnderstanding.cs**. diff --git a/com.htc.upm.vive.openxr/package.json b/com.htc.upm.vive.openxr/package.json index f61e924..1dd1390 100644 --- a/com.htc.upm.vive.openxr/package.json +++ b/com.htc.upm.vive.openxr/package.json @@ -1,7 +1,7 @@ { "name": "com.htc.upm.vive.openxr", "displayName": "VIVE OpenXR Plugin - Windows", - "version": "1.0.12", + "version": "1.0.13", "unity": "2020.3", "description": "VIVE OpenXR Plugin - Windows provides (1) Vive Facial Tracking (2) Vive Cosmos Controller (3) Scene Understanding (4) Hand Tracking (5) Vive Focus3 Controller support for Unity OpenXR (6) Hand Interaction (7) Palm pose.", "keywords": [