From 76cefa0a8d0d782c9eaee4c62d2305b1a3c37825 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Fri, 16 May 2025 13:53:44 -0400 Subject: [PATCH 01/24] refactor guards wrap only what is necessary --- .../com.unity.inputsystem/Documentation~/filter.yml | 12 ++++++++++++ .../InputSystem/Plugins/XR/Devices/GoogleVR.cs | 3 +-- .../InputSystem/Plugins/XR/Devices/Oculus.cs | 3 +-- .../InputSystem/Plugins/XR/Devices/OpenVR.cs | 3 +-- .../InputSystem/Plugins/XR/Devices/WindowsMR.cs | 3 +-- .../InputSystem/Plugins/XR/GenericXRDevice.cs | 6 ++---- .../InputSystem/Plugins/XR/Haptics/BufferedRumble.cs | 3 --- .../XR/Haptics/GetCurrentHapticStateCommand.cs | 3 --- .../XR/Haptics/GetHapticCapabilitiesCommand.cs | 3 --- .../Plugins/XR/Haptics/SendBufferedHapticsCommand.cs | 3 --- .../Plugins/XR/Haptics/SendHapticImpulseCommand.cs | 3 --- .../InputSystem/Plugins/XR/XRLayoutBuilder.cs | 7 ++----- .../InputSystem/Plugins/XR/XRSupport.cs | 10 ++++++---- 13 files changed, 26 insertions(+), 36 deletions(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 844f071c39..04ac179404 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -37,3 +37,15 @@ apiRules: - exclude: uidRegex: ^UnityEngine\.InputSystem\.InputSystem\.runInBackground$ type: Member + - exclude: + uidRegex: ^Unity\.XR\.Oculus\.Input\..*$ + type: Namespace + - exclude: + uidRegex: ^Unity\.XR\.GoogleVr\..*$ + type: Namespace + - exclude: + uidRegex: ^Unity\.XR\.OpenVR\..*$ + type: Namespace + - exclude: + uidRegex: ^Unity\.XR\.WindowsMR\.Input\..*$ + type: Namespace diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/GoogleVR.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/GoogleVR.cs index a4dab309ff..ca156f0a8c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/GoogleVR.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/GoogleVR.cs @@ -1,6 +1,5 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. +#if !DISABLE_BUILTIN_INPUT_SYSTEM_GOOGLEVR // Docs generation is skipped because these are intended to be replaced with the com.unity.xr.googlevr package. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !DISABLE_BUILTIN_INPUT_SYSTEM_GOOGLEVR && !UNITY_FORCE_INPUTSYSTEM_XR_OFF && !PACKAGE_DOCS_GENERATION using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.Layouts; using UnityEngine.InputSystem.XR; diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/Oculus.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/Oculus.cs index 8267c728d5..9c8e0e65b5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/Oculus.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/Oculus.cs @@ -1,6 +1,5 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. +#if !DISABLE_BUILTIN_INPUT_SYSTEM_OCULUS // Docs generation is skipped because these are intended to be replaced with the com.unity.xr.oculus package. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !DISABLE_BUILTIN_INPUT_SYSTEM_OCULUS && !UNITY_FORCE_INPUTSYSTEM_XR_OFF && !PACKAGE_DOCS_GENERATION using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.Layouts; diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/OpenVR.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/OpenVR.cs index c109b57989..a099be99fc 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/OpenVR.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/OpenVR.cs @@ -1,6 +1,5 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. +#if !DISABLE_BUILTIN_INPUT_SYSTEM_OPENVR // Docs generation is skipped because these are intended to be replaced with the com.unity.xr.openvr package. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !DISABLE_BUILTIN_INPUT_SYSTEM_OPENVR && !UNITY_FORCE_INPUTSYSTEM_XR_OFF && !PACKAGE_DOCS_GENERATION using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.Layouts; diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/WindowsMR.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/WindowsMR.cs index d018cd5f0a..d8b3513e9f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/WindowsMR.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/WindowsMR.cs @@ -1,6 +1,5 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. +#if !DISABLE_BUILTIN_INPUT_SYSTEM_WINDOWSMR // Docs generation is skipped because these are intended to be replaced with the com.unity.xr.windowsmr package. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !DISABLE_BUILTIN_INPUT_SYSTEM_WINDOWSMR && !UNITY_FORCE_INPUTSYSTEM_XR_OFF && !PACKAGE_DOCS_GENERATION using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.Layouts; using UnityEngine.InputSystem.XR; diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index cfbbb51f0a..035cf38d36 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -1,5 +1,3 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !UNITY_FORCE_INPUTSYSTEM_XR_OFF || PACKAGE_DOCS_GENERATION using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.XR.Haptics; using UnityEngine.InputSystem.Layouts; @@ -100,7 +98,7 @@ public class XRController : TrackedDevice protected override void FinishSetup() { base.FinishSetup(); - +#if UNITY_INPUT_SYSTEM_ENABLE_XR var capabilities = description.capabilities; var deviceDescriptor = XRDeviceDescriptor.FromJson(capabilities); @@ -111,6 +109,7 @@ protected override void FinishSetup() else if ((deviceDescriptor.characteristics & InputDeviceCharacteristics.Right) != 0) InputSystem.SetDeviceUsage(this, CommonUsages.RightHand); } +#endif } } @@ -126,4 +125,3 @@ public void SendImpulse(float amplitude, float duration) } } } -#endif diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/BufferedRumble.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/BufferedRumble.cs index 20bd60c591..cffe32f027 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/BufferedRumble.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/BufferedRumble.cs @@ -1,5 +1,3 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION namespace UnityEngine.InputSystem.XR.Haptics { public struct BufferedRumble @@ -26,4 +24,3 @@ public void EnqueueRumble(byte[] samples) } } } -#endif diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetCurrentHapticStateCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetCurrentHapticStateCommand.cs index c246037db7..beb7531cb1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetCurrentHapticStateCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetCurrentHapticStateCommand.cs @@ -1,5 +1,3 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION using System.Runtime.InteropServices; using UnityEngine.InputSystem.LowLevel; using UnityEngine.InputSystem.Utilities; @@ -47,4 +45,3 @@ public static GetCurrentHapticStateCommand Create() } } } -#endif diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetHapticCapabilitiesCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetHapticCapabilitiesCommand.cs index 670ccd158f..f1b49f4e0b 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetHapticCapabilitiesCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetHapticCapabilitiesCommand.cs @@ -1,5 +1,3 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION using System.Runtime.InteropServices; using UnityEngine.InputSystem.LowLevel; using UnityEngine.InputSystem.Utilities; @@ -156,4 +154,3 @@ public static GetHapticCapabilitiesCommand Create() } } } -#endif diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendBufferedHapticsCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendBufferedHapticsCommand.cs index 577d38bbaf..cbea007992 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendBufferedHapticsCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendBufferedHapticsCommand.cs @@ -1,5 +1,3 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION using System.Runtime.InteropServices; using UnityEngine.InputSystem.LowLevel; using UnityEngine.InputSystem.Utilities; @@ -53,4 +51,3 @@ public static SendBufferedHapticCommand Create(byte[] rumbleBuffer) } } } -#endif diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendHapticImpulseCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendHapticImpulseCommand.cs index e9985d9eca..8a979d2fef 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendHapticImpulseCommand.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendHapticImpulseCommand.cs @@ -1,5 +1,3 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION using System.Runtime.InteropServices; using UnityEngine.InputSystem.LowLevel; using UnityEngine.InputSystem.Utilities; @@ -50,4 +48,3 @@ public static SendHapticImpulseCommand Create(int motorChannel, float motorAmpli } } } -#endif diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRLayoutBuilder.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRLayoutBuilder.cs index 3c3ef1aa31..b5715ba6e8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRLayoutBuilder.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRLayoutBuilder.cs @@ -1,5 +1,3 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !UNITY_FORCE_INPUTSYSTEM_XR_OFF using System; using System.Collections.Generic; using UnityEngine.InputSystem.LowLevel; @@ -90,7 +88,7 @@ internal static string OnFindLayoutForDevice(ref InputDeviceDescription descript { return null; } - +#if UNITY_INPUT_SYSTEM_ENABLE_XR if (string.IsNullOrEmpty(matchedLayout)) { const InputDeviceCharacteristics controllerCharacteristics = InputDeviceCharacteristics.HeldInHand | InputDeviceCharacteristics.Controller; @@ -99,7 +97,7 @@ internal static string OnFindLayoutForDevice(ref InputDeviceDescription descript else if ((deviceDescriptor.characteristics & controllerCharacteristics) == controllerCharacteristics) matchedLayout = "XRController"; } - +#endif string layoutName; if (string.IsNullOrEmpty(description.manufacturer)) { @@ -341,4 +339,3 @@ private InputControlLayout Build() } } } -#endif diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs index bcf3818581..c58a0b7756 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs @@ -1,5 +1,3 @@ -// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. -#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION using System; using System.Collections.Generic; using UnityEngine.InputSystem.Layouts; @@ -104,7 +102,12 @@ public class XRDeviceDescriptor /// /// The capabilities of the device, used to help filter and identify devices that server a certain purpose (e.g. controller, or headset, or hardware tracker). /// +#if UNITY_INPUT_SYSTEM_ENABLE_XR public InputDeviceCharacteristics characteristics; +#else + [SerializeField] + private uint characteristics; +#endif /// /// The underlying deviceId, this can be used with to create a device. /// @@ -388,7 +391,7 @@ static class XRSupport /// public static void Initialize() { -#if !UNITY_FORCE_INPUTSYSTEM_XR_OFF +#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !UNITY_FORCE_INPUTSYSTEM_XR_OFF InputSystem.RegisterLayout("Pose"); InputSystem.RegisterLayout("Bone"); InputSystem.RegisterLayout("Eyes"); @@ -506,4 +509,3 @@ public static void Initialize() } } } -#endif From adb406a3d25f691d7c6585944846a6158601fd8a Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Fri, 16 May 2025 13:58:18 -0400 Subject: [PATCH 02/24] update changlog --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 7479fcbc14..486d4f7d4f 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -37,6 +37,7 @@ however, it has to be formatted properly to pass verification tests. ### Changed - Changed enum value `Key.IMESelected` to obsolete which was not a real key. Please use the ButtonControl `imeSelected`. +- Changed conditional guards inside Plugins/XR so that we don't unnecessarily wrap entire classes. This stops downstream packages from having to also wrap Input System objects with similar conditionals. ### Added - Added support of F13-F24 keys. [UUM-44328](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-44328) From 99cd2d513dbeb7ddeca8c51780609f9375d0d598 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Wed, 21 May 2025 12:02:59 -0400 Subject: [PATCH 03/24] add comments for public api --- .../InputSystem/Plugins/XR/GenericXRDevice.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index 035cf38d36..8eb8e8b01d 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -32,16 +32,39 @@ public class XRHMD : TrackedDevice /// /// + /// + /// Accessor for left eye position. + /// [InputControl(noisy = true)] public Vector3Control leftEyePosition { get; protected set; } + + /// + /// Accessor for left eye rotation. + /// [InputControl(noisy = true)] public QuaternionControl leftEyeRotation { get; protected set; } [InputControl(noisy = true)] + + /// + /// Accessor for right eye position. + /// public Vector3Control rightEyePosition { get; protected set; } [InputControl(noisy = true)] + + /// + /// Accessor for right eye rotation. + /// public QuaternionControl rightEyeRotation { get; protected set; } + + /// + /// Accessor for center eye position. + /// [InputControl(noisy = true)] public Vector3Control centerEyePosition { get; protected set; } + + /// + /// Accessor for center eye rotation. + /// [InputControl(noisy = true)] public QuaternionControl centerEyeRotation { get; protected set; } @@ -118,6 +141,11 @@ protected override void FinishSetup() /// public class XRControllerWithRumble : XRController { + /// + /// Sends an impulse command with the given amplitude and duration. + /// + /// Amplitude of the impulse. + /// Duration of the impulse. public void SendImpulse(float amplitude, float duration) { var command = SendHapticImpulseCommand.Create(0, amplitude, duration); From 27b28008c3f21ecdf1e416d72f22a3aa6d0c390d Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Thu, 22 May 2025 14:07:16 -0400 Subject: [PATCH 04/24] try excluding classes from docs --- .../Documentation~/filter.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 04ac179404..2f346780c8 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -49,3 +49,21 @@ apiRules: - exclude: uidRegex: ^Unity\.XR\.WindowsMR\.Input\..*$ type: Namespace + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD\..*$ + type: Member + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRController$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRController\..*$ + type: Member + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble\..*$ + type: Member From bf80417412c0b30aa4778d77f700dfb327387a03 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Thu, 22 May 2025 16:25:34 -0400 Subject: [PATCH 05/24] try excluding more classes --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 2f346780c8..04250527f4 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -49,6 +49,9 @@ apiRules: - exclude: uidRegex: ^Unity\.XR\.WindowsMR\.Input\..*$ type: Namespace + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics\..*$ + type: Namespace - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD$ type: Type @@ -67,3 +70,9 @@ apiRules: - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble\..*$ type: Member + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRSupport$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRSupport\..*$ + type: Member From 9c64247c019ca0b3670e6ebd510f91de4f960670 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Wed, 28 May 2025 13:49:36 -0400 Subject: [PATCH 06/24] add package docs check --- .../com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs index c58a0b7756..6e9f8fe33b 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs @@ -1,3 +1,5 @@ +#if PACKAGE_DOCS_GENERATION + using System; using System.Collections.Generic; using UnityEngine.InputSystem.Layouts; @@ -509,3 +511,4 @@ public static void Initialize() } } } +#endif From dd2569bee7e6be600660b009aa55d8233d42648f Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Wed, 28 May 2025 14:12:22 -0400 Subject: [PATCH 07/24] try reverse --- .../com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs index 6e9f8fe33b..e35dddbb88 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs @@ -1,4 +1,4 @@ -#if PACKAGE_DOCS_GENERATION +#if !PACKAGE_DOCS_GENERATION using System; using System.Collections.Generic; From 893531cfc24baf4ad5fb3807a44afb2cc188726d Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Fri, 30 May 2025 12:36:28 -0400 Subject: [PATCH 08/24] remove see also --- .../com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs index e35dddbb88..fc7988b0b3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs @@ -115,7 +115,7 @@ public class XRDeviceDescriptor /// public int deviceId; /// - /// A list of all input features. + /// A list of all input features. /// public List inputFeatures; From 06af488abdfd09172a0ebbe7c127ba4f66167073 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Fri, 30 May 2025 14:41:09 -0400 Subject: [PATCH 09/24] fill in empty tag --- .../com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs index fc7988b0b3..fce4d393d5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs @@ -122,7 +122,7 @@ public class XRDeviceDescriptor /// /// Converts this structure to a JSON string. /// - /// + /// A JSON string. public string ToJson() { return JsonUtility.ToJson(this); From 1b146a42efdcf0d67de41be8b0b161bc9a9ca39c Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Fri, 30 May 2025 17:56:48 -0400 Subject: [PATCH 10/24] regex fix --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 2 +- .../com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 04250527f4..eed7babf8e 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -50,7 +50,7 @@ apiRules: uidRegex: ^Unity\.XR\.WindowsMR\.Input\..*$ type: Namespace - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics\..*$ + uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ type: Namespace - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD$ diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs index fce4d393d5..5a2721bfb2 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs @@ -1,5 +1,3 @@ -#if !PACKAGE_DOCS_GENERATION - using System; using System.Collections.Generic; using UnityEngine.InputSystem.Layouts; @@ -511,4 +509,3 @@ public static void Initialize() } } } -#endif From 87a0c2af932e8679a136301632eeece12af35d7c Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Fri, 30 May 2025 20:23:41 -0400 Subject: [PATCH 11/24] fix yaml namespaces --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index eed7babf8e..b04dc80bf9 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -38,16 +38,16 @@ apiRules: uidRegex: ^UnityEngine\.InputSystem\.InputSystem\.runInBackground$ type: Member - exclude: - uidRegex: ^Unity\.XR\.Oculus\.Input\..*$ + uidRegex: ^Unity\.XR\.Oculus\.Input(?:\..+)*$ type: Namespace - exclude: - uidRegex: ^Unity\.XR\.GoogleVr\..*$ + uidRegex: ^Unity\.XR\.GoogleVr(?:\..+)*$ type: Namespace - exclude: - uidRegex: ^Unity\.XR\.OpenVR\..*$ + uidRegex: ^Unity\.XR\.OpenVR(?:\..+)*$ type: Namespace - exclude: - uidRegex: ^Unity\.XR\.WindowsMR\.Input\..*$ + uidRegex: ^Unity\.XR\.WindowsMR\.Input(?:\..+)**$ type: Namespace - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ From b8445715e2fedf1a6a55f6a4a0a2b08da0cef6e2 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Mon, 2 Jun 2025 18:23:50 -0400 Subject: [PATCH 12/24] fix regex --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index b04dc80bf9..1ac314d72b 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -47,7 +47,7 @@ apiRules: uidRegex: ^Unity\.XR\.OpenVR(?:\..+)*$ type: Namespace - exclude: - uidRegex: ^Unity\.XR\.WindowsMR\.Input(?:\..+)**$ + uidRegex: ^Unity\.XR\.WindowsMR\.Input(?:\..+)*$ type: Namespace - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ From e482c47f2ebe4c3f2a07f8328f475267aba5825a Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Tue, 3 Jun 2025 11:02:36 -0400 Subject: [PATCH 13/24] more regex --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 1ac314d72b..5a315f8aec 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -47,7 +47,7 @@ apiRules: uidRegex: ^Unity\.XR\.OpenVR(?:\..+)*$ type: Namespace - exclude: - uidRegex: ^Unity\.XR\.WindowsMR\.Input(?:\..+)*$ + uidRegex: ^Unity\.XR\.WindowsMR\.Input..*$ type: Namespace - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ From 0753c0c4f5e25225c105fb7c61118c2d875bd24f Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Tue, 3 Jun 2025 11:03:15 -0400 Subject: [PATCH 14/24] more regex --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 5a315f8aec..f362515fdf 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -47,7 +47,7 @@ apiRules: uidRegex: ^Unity\.XR\.OpenVR(?:\..+)*$ type: Namespace - exclude: - uidRegex: ^Unity\.XR\.WindowsMR\.Input..*$ + uidRegex: ^Unity\.XR\.WindowsMR\.Input\..*$ type: Namespace - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ From 715701f273aff398eb635d27c74655a0e9107c7c Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Tue, 3 Jun 2025 11:04:15 -0400 Subject: [PATCH 15/24] fix namespace --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index f362515fdf..6f6119cf8c 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -47,7 +47,7 @@ apiRules: uidRegex: ^Unity\.XR\.OpenVR(?:\..+)*$ type: Namespace - exclude: - uidRegex: ^Unity\.XR\.WindowsMR\.Input\..*$ + uidRegex: ^UnityEngine\.XR\.WindowsMR\.Input(?:\..+)*$ type: Namespace - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ From 7ca021283584686f6aee20571103fd55e8bf8d85 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Tue, 3 Jun 2025 12:42:45 -0400 Subject: [PATCH 16/24] add more to filter --- .../Documentation~/filter.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 6f6119cf8c..a5df417b89 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -76,3 +76,27 @@ apiRules: - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRSupport\..*$ type: Member + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.FeatureType$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.UsageHint$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRFeatureDescriptor$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRDeviceDescriptor$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.Bone$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.Eyes$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.BoneControl$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.EyesControl$ + type: Type \ No newline at end of file From f7562ef33e31744861f5c1d49b5d982cbce18fdb Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Wed, 4 Jun 2025 16:18:31 -0400 Subject: [PATCH 17/24] try packagedocs on generic --- .../Documentation~/filter.yml | 18 ------------------ .../InputSystem/Plugins/XR/GenericXRDevice.cs | 2 ++ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index a5df417b89..110291f6bf 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -52,24 +52,6 @@ apiRules: - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ type: Namespace - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD$ - type: Type - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD\..*$ - type: Member - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRController$ - type: Type - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRController\..*$ - type: Member - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble$ - type: Type - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble\..*$ - type: Member - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRSupport$ type: Type diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index 8eb8e8b01d..e32921baa8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -1,3 +1,4 @@ +#if PACKAGE_DOCS_GENERATION using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.XR.Haptics; using UnityEngine.InputSystem.Layouts; @@ -153,3 +154,4 @@ public void SendImpulse(float amplitude, float duration) } } } +#endif \ No newline at end of file From 657edfc50df8923830243a87036b19d93a62b5cb Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Thu, 5 Jun 2025 11:49:09 -0400 Subject: [PATCH 18/24] revert back to filter yaml --- .../Documentation~/filter.yml | 18 ++++++++++++++++++ .../InputSystem/Plugins/XR/GenericXRDevice.cs | 2 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 110291f6bf..a5df417b89 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -52,6 +52,24 @@ apiRules: - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ type: Namespace + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD\..*$ + type: Member + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRController$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRController\..*$ + type: Member + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble$ + type: Type + - exclude: + uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble\..*$ + type: Member - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRSupport$ type: Type diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index e32921baa8..8eb8e8b01d 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -1,4 +1,3 @@ -#if PACKAGE_DOCS_GENERATION using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.XR.Haptics; using UnityEngine.InputSystem.Layouts; @@ -154,4 +153,3 @@ public void SendImpulse(float amplitude, float duration) } } } -#endif \ No newline at end of file From 4b05baefff6e0933300c7d99b62c0fd0f95df2c6 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Thu, 5 Jun 2025 12:08:01 -0400 Subject: [PATCH 19/24] removal from filter --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index a5df417b89..2398081491 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -55,15 +55,6 @@ apiRules: - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD$ type: Type - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD\..*$ - type: Member - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRController$ - type: Type - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRController\..*$ - type: Member - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble$ type: Type From 0d7b48f71328c0dcc94f99ddf21ded1c2a6d858a Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Thu, 5 Jun 2025 14:23:48 -0400 Subject: [PATCH 20/24] remove xrhmd from filter --- Packages/com.unity.inputsystem/Documentation~/filter.yml | 3 --- .../InputSystem/Plugins/XR/GenericXRDevice.cs | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml index 2398081491..ec90ba2c34 100644 --- a/Packages/com.unity.inputsystem/Documentation~/filter.yml +++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml @@ -52,9 +52,6 @@ apiRules: - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$ type: Namespace - - exclude: - uidRegex: ^UnityEngine\.InputSystem\.XR\.XRHMD$ - type: Type - exclude: uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble$ type: Type diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index 8eb8e8b01d..0ef0dcbd3a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -5,6 +5,9 @@ namespace UnityEngine.InputSystem.XR { + /// + /// The base type for all XR head mounted displays. + /// [InputControlLayout(isGenericTypeOfDevice = true, displayName = "XR HMD", canRunInBackground = true)] public class XRHMD : TrackedDevice { From b44ff3147f60c57a183db81dcbfd68d27f06bb92 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Mon, 9 Jun 2025 11:12:47 -0400 Subject: [PATCH 21/24] fix tags --- .../InputSystem/Plugins/XR/GenericXRDevice.cs | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index 0ef0dcbd3a..054c43e10b 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -20,16 +20,12 @@ public class XRHMD : TrackedDevice /// To give your head tracking an extra update before rendering: /// First, enable before render updates on your Device. /// - /// - /// /// // JSON /// { /// "name" : "MyHMD", /// "extend" : "HMD", /// "beforeRender" : "Update" /// } - /// - /// /// /// Then, make sure you put extra `StateEvents` for your HMD on the queue right in time before rendering. Also, if your HMD is a combination of non-tracking and tracking controls, you can update just the tracking by sending a delta event instead of a full state event. /// @@ -96,22 +92,12 @@ public class XRController : TrackedDevice /// /// If there is no left hand connected, this will be null. /// This also matches any currently tracked device that contains the 'LeftHand' device usage. - /// - /// - /// // To set up an Action to specifically target - /// // the left-hand XR controller: - /// + /// To set up an Action to specifically target + /// the left-hand XR controller: /// var action = new InputAction(binding: "/<XRController>{leftHand}/position"); - /// - /// - /// - /// - /// - /// // To make the left-hand XR controller behave like the right-hand one + /// To make the left-hand XR controller behave like the right-hand one /// var controller = XRController.leftHand; /// InputSystem.SetUsage(controller, CommonUsages.RightHand); - /// - /// /// public static XRController leftHand => InputSystem.GetDevice(CommonUsages.LeftHand); From 8519aa3e40ef3a898c8b1a166f82b2ee5b092807 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Mon, 9 Jun 2025 13:53:57 -0400 Subject: [PATCH 22/24] move summary --- .../InputSystem/Plugins/XR/GenericXRDevice.cs | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index 054c43e10b..11ccc75351 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -6,31 +6,27 @@ namespace UnityEngine.InputSystem.XR { /// - /// The base type for all XR head mounted displays. + /// The base type of all XR head mounted displays. This can help organize shared behaviour across all HMDs. /// + /// + /// + /// + /// To give your head tracking an extra update before rendering: + /// First, enable before render updates on your Device. + /// + /// // JSON + /// { + /// "name" : "MyHMD", + /// "extend" : "HMD", + /// "beforeRender" : "Update" + /// } + /// + /// Then, make sure you put extra `StateEvents` for your HMD on the queue right in time before rendering. Also, if your HMD is a combination of non-tracking and tracking controls, you can update just the tracking by sending a delta event instead of a full state event. + /// + /// [InputControlLayout(isGenericTypeOfDevice = true, displayName = "XR HMD", canRunInBackground = true)] public class XRHMD : TrackedDevice { - /// - /// The base type of all XR head mounted displays. This can help organize shared behaviour across all HMDs. - /// - /// - /// - /// - /// To give your head tracking an extra update before rendering: - /// First, enable before render updates on your Device. - /// - /// // JSON - /// { - /// "name" : "MyHMD", - /// "extend" : "HMD", - /// "beforeRender" : "Update" - /// } - /// - /// Then, make sure you put extra `StateEvents` for your HMD on the queue right in time before rendering. Also, if your HMD is a combination of non-tracking and tracking controls, you can update just the tracking by sending a delta event instead of a full state event. - /// - /// - /// /// Accessor for left eye position. /// From b6f4d644c80a827e814ef157fef73c87e4106493 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Mon, 9 Jun 2025 14:05:04 -0400 Subject: [PATCH 23/24] fix summaries --- .../InputSystem/Plugins/XR/GenericXRDevice.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index 11ccc75351..4784a1b915 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -38,17 +38,17 @@ public class XRHMD : TrackedDevice /// [InputControl(noisy = true)] public QuaternionControl leftEyeRotation { get; protected set; } - [InputControl(noisy = true)] /// /// Accessor for right eye position. /// - public Vector3Control rightEyePosition { get; protected set; } [InputControl(noisy = true)] + public Vector3Control rightEyePosition { get; protected set; } /// /// Accessor for right eye rotation. /// + [InputControl(noisy = true)] public QuaternionControl rightEyeRotation { get; protected set; } /// @@ -63,6 +63,9 @@ public class XRHMD : TrackedDevice [InputControl(noisy = true)] public QuaternionControl centerEyeRotation { get; protected set; } + /// + /// Override for FinishSetup(). + /// protected override void FinishSetup() { base.FinishSetup(); From a9e7791ce3b5e37dddb0cc9af743a9e0a3c433d6 Mon Sep 17 00:00:00 2001 From: Jason Diehl Date: Mon, 9 Jun 2025 14:38:08 -0400 Subject: [PATCH 24/24] add summary --- .../InputSystem/Plugins/XR/GenericXRDevice.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs index 4784a1b915..f1c1666d28 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs @@ -106,6 +106,9 @@ public class XRController : TrackedDevice /// If there is no left hand connected, this will be null. This also matches any currently tracked device that contains the 'RightHand' device usage. public static XRController rightHand => InputSystem.GetDevice(CommonUsages.RightHand); + /// + /// Override for FinishSetup(). + /// protected override void FinishSetup() { base.FinishSetup();