From 751b6afe0825302256a616944587f3f96346622e Mon Sep 17 00:00:00 2001 From: "roger.liu" Date: Thu, 2 Oct 2025 15:54:34 -0700 Subject: [PATCH 1/6] Removing dependencies on VRModule --- .../Plugins/XR/TrackedPoseDriver.cs | 34 ------------------- .../InputSystem/Unity.InputSystem.asmdef | 5 --- Packages/manifest.json | 1 - .../Packages/manifest.json | 1 - 4 files changed, 41 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs index 36f312a1e9..4a695617d6 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs @@ -413,23 +413,6 @@ protected void Reset() m_TrackingStateInput = new InputActionProperty(new InputAction("Tracking State", expectedControlType: "Integer")); } - /// - /// This function is called when the script instance is being loaded. - /// - protected virtual void Awake() - { -#if UNITY_INPUT_SYSTEM_ENABLE_VR && ENABLE_VR - if (HasStereoCamera(out var cameraComponent)) - { - // The Unity 6.4+ replacement for this call has to be figured later - // See https://jira.unity3d.com/browse/XR-7591 -#pragma warning disable CS0618 - UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking(cameraComponent, true); -#pragma warning restore CS0618 - } -#endif - } - /// /// This function is called when the object becomes enabled and active. /// @@ -454,23 +437,6 @@ protected void OnDisable() InputSystem.onDeviceChange -= OnDeviceChanged; } - /// - /// This function is called when the will be destroyed. - /// - protected virtual void OnDestroy() - { -#if UNITY_INPUT_SYSTEM_ENABLE_VR && ENABLE_VR - if (HasStereoCamera(out var cameraComponent)) - { - // The Unity 6.4+ replacement for this call has to be figured later - // See https://jira.unity3d.com/browse/XR-7591 -#pragma warning disable CS0618 - UnityEngine.XR.XRDevice.DisableAutoXRCameraTracking(cameraComponent, false); -#pragma warning restore CS0618 - } -#endif - } - /// /// The callback method called after the Input System has completed an update and processed all pending events. /// diff --git a/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef b/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef index 7dc45c083f..3adff080e5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef +++ b/Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef @@ -32,11 +32,6 @@ "expression": "2.0.3", "define": "DISABLE_BUILTIN_INPUT_SYSTEM_WINDOWSMR" }, - { - "name": "com.unity.modules.vr", - "expression": "1.0.0", - "define": "UNITY_INPUT_SYSTEM_ENABLE_VR" - }, { "name": "com.unity.modules.xr", "expression": "1.0.0", diff --git a/Packages/manifest.json b/Packages/manifest.json index 47deea3119..04e9d9d2b6 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -41,7 +41,6 @@ "com.unity.modules.unitywebrequestwww": "1.0.0", "com.unity.modules.vehicles": "1.0.0", "com.unity.modules.video": "1.0.0", - "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0" } diff --git a/Tools/CodeAnalyzerTestProject/Packages/manifest.json b/Tools/CodeAnalyzerTestProject/Packages/manifest.json index 2101eb315c..8a2c71da62 100644 --- a/Tools/CodeAnalyzerTestProject/Packages/manifest.json +++ b/Tools/CodeAnalyzerTestProject/Packages/manifest.json @@ -30,7 +30,6 @@ "com.unity.modules.unitywebrequestwww": "1.0.0", "com.unity.modules.vehicles": "1.0.0", "com.unity.modules.video": "1.0.0", - "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0" } From db1e773fc1213fa507f49464277a92972ef2d2b5 Mon Sep 17 00:00:00 2001 From: "roger.liu" Date: Thu, 2 Oct 2025 16:12:23 -0700 Subject: [PATCH 2/6] Added changelog entry --- 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 ce6fe06286..386ecc1cf5 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -11,6 +11,7 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd - Fixed InputControl picker not updating correctly when the Input Actions Window was dirty. [ISXB-1221](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1221) - Fixed formatting issues on processor documentation page +- Fixed an issue where a warning would be appear due to code referencing the obsolete com.unity.modules.vr package. ### Changed - Expanded `RebindingUISample` to include a "game mode" state and a "menu state" to be more similar to a real game. Also added action-performed indicators (`InputActionIndicator`) illustrating when actions get triggered. From c1f3927d82da2902b84bebd64f240ba77e3f111f Mon Sep 17 00:00:00 2001 From: "roger.liu" Date: Mon, 6 Oct 2025 14:46:40 -0700 Subject: [PATCH 3/6] Adding back API so as not to be a breaking change --- .../InputSystem/Plugins/XR/TrackedPoseDriver.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs index 4a695617d6..5dcd811dc4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs @@ -413,6 +413,13 @@ protected void Reset() m_TrackingStateInput = new InputActionProperty(new InputAction("Tracking State", expectedControlType: "Integer")); } + /// + /// This function is called when the script instance is being loaded. + /// + protected virtual void Awake() + { + } + /// /// This function is called when the object becomes enabled and active. /// @@ -437,6 +444,13 @@ protected void OnDisable() InputSystem.onDeviceChange -= OnDeviceChanged; } + /// + /// This function is called when the will be destroyed. + /// + protected virtual void OnDestroy() + { + } + /// /// The callback method called after the Input System has completed an update and processed all pending events. /// From 0ba6efe3ce9d733e9512be29f039810f803996d8 Mon Sep 17 00:00:00 2001 From: "roger.liu" Date: Thu, 9 Oct 2025 10:35:38 -0700 Subject: [PATCH 4/6] removing unused helper method --- .../InputSystem/Plugins/XR/TrackedPoseDriver.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs index 5dcd811dc4..affde24152 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs @@ -610,11 +610,6 @@ protected virtual void SetLocalTransform(Vector3 newPosition, Quaternion newRota } } - bool HasStereoCamera(out Camera cameraComponent) - { - return TryGetComponent(out cameraComponent) && cameraComponent.stereoEnabled; - } - // Evaluates whether the given action has at least one resolved control and may generate input. private static bool HasResolvedControl(InputAction action) { From 0b427882725626a33f8d694d13525803ce2ffdf4 Mon Sep 17 00:00:00 2001 From: "roger.liu" Date: Thu, 9 Oct 2025 10:37:08 -0700 Subject: [PATCH 5/6] Applying changelog suggestion --- Packages/com.unity.inputsystem/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 83aebd12cc..27e390ec4f 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -32,7 +32,9 @@ however, it has to be formatted properly to pass verification tests. - Fixed an issue in `Keyboard` where the sub-script operator would return a `null` key control for the deprecated key `Key.IMESelected`. Now, an aliased `KeyControl`mapping to the IMESelected bit is returned for compability reasons. It is still strongly advised to not rely on this key since `IMESelected` bit isn't strictly a key and will be removed from the `Key` enumeration type in a future major revision. [ISXB-1541](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1541). - Fixed InputControl picker not updating correctly when the Input Actions Window was dirty. [ISXB-1221](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1221) - Fixed formatting issues on processor documentation page -- Fixed an issue where a warning would be appear due to code referencing the obsolete com.unity.modules.vr package. + +### Changed +- Changed: Input System no longer depends the obsolete com.unity.modules.vr package. ## [1.14.2] - 2025-08-05 From ce9bf10aeae4db02c30c9b808af4e38b4680974e Mon Sep 17 00:00:00 2001 From: "roger.liu" Date: Thu, 16 Oct 2025 11:43:06 -0700 Subject: [PATCH 6/6] Moved changelog entry to unreleased section --- Packages/com.unity.inputsystem/CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index ce07f73faf..aee42048d6 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -12,6 +12,7 @@ however, it has to be formatted properly to pass verification tests. ### Changed - Replaced "Look" rebinding button for "Keyboard" control scheme with a mouse sensitivity slider in `RebindingUISample` to illustrate how to support customizing scaling of mouse deltas and how to reapply the persisted setting between runs. +- Changed: Input System no longer depends the obsolete com.unity.modules.vr package. ### Added - Added an example of how to swap two similar controls to the `RebindingUISample`. This is accessible via a button with two arrows at the right hand-side of the screen. Pressing the button allows swapping the current bindings of the "Move" and "Look" gamepad bindings via the new `RebindActionUI.SwapBinding(RebindActionUI other)` method. @@ -44,9 +45,6 @@ however, it has to be formatted properly to pass verification tests. - Fixed InputControl picker not updating correctly when the Input Actions Window was dirty. [ISXB-1221](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1221) - Fixed formatting issues on processor documentation page -### Changed -- Changed: Input System no longer depends the obsolete com.unity.modules.vr package. - ## [1.14.2] - 2025-08-05 ### Fixed