From 88514eea779311bf3f423935aaaa041eae61ecfe Mon Sep 17 00:00:00 2001 From: Trudy Spiller Date: Tue, 21 Jan 2025 13:42:25 +0000 Subject: [PATCH 1/3] Update CHANGELOG.md --- 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 10d6a60fa3..7d6f1ed907 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -15,6 +15,7 @@ however, it has to be formatted properly to pass verification tests. - Fixed arrow key navigation of Input Actions after Action rename. [ISXB-1024](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1024) - Fixed gamepad navigation in UI Toolkit TextField when using InputSystemUIInputModule. [UUM-77364](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-77364) - Fixed issue where asset editor window splitter positions were not persisted [ISXB-1316] +- Fixed an issue where ButtonStates are not fully updated when switching SingleUnifiedPointer. [ISXB-1356](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1356) ### Changed - Changed default input action asset name from New Controls to New Actions. From 98fe22acb2574e250cc7c327d7eb577d6fff2bff Mon Sep 17 00:00:00 2001 From: Trudy Spiller Date: Mon, 20 Jan 2025 13:00:35 +0000 Subject: [PATCH 2/3] Set pointer buttons back to default so the values are properly based on new event data --- .../InputSystem/Plugins/UI/InputSystemUIInputModule.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs index b4b9202b18..f2443f4fa7 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs @@ -1931,6 +1931,15 @@ private int GetPointerStateIndexFor(InputControl control, bool createIfNotExists // Make sure these don't linger around when we switch to a different kind of pointer. eventData.trackedDeviceOrientation = default; eventData.trackedDevicePosition = default; + + // We only have a single pointer state and current frame press state values was based on previous eventData. + // Make sure these get updated when we switch. + if (m_PointerBehavior == UIPointerBehavior.SingleUnifiedPointer) + { + pointer.leftButton.OnEndFrame(); + pointer.rightButton.OnEndFrame(); + pointer.middleButton.OnEndFrame(); + } } if (pointerType == UIPointerType.Touch) From 41bd3b77d73f5af5c7231da89317fdff011157e2 Mon Sep 17 00:00:00 2001 From: Trudy Spiller <44834297+tspiller@users.noreply.github.com> Date: Wed, 19 Feb 2025 10:59:39 +0000 Subject: [PATCH 3/3] Update CHANGELOG.md --- 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 7c8cd1e7a8..fd44533e54 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,6 +10,9 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd +### Fixed +- Fixed an issue where ButtonStates are not fully updated when switching SingleUnifiedPointer. [ISXB-1356](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1356) + ## [1.13.1] - 2025-02-18 ### Fixed @@ -18,7 +21,6 @@ however, it has to be formatted properly to pass verification tests. - Fixed arrow key navigation of Input Actions after Action rename. [ISXB-1024](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1024) - Fixed gamepad navigation in UI Toolkit TextField when using InputSystemUIInputModule. [UUM-77364](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-77364) - Fixed issue where asset editor window splitter positions were not persisted [ISXB-1316] -- Fixed an issue where ButtonStates are not fully updated when switching SingleUnifiedPointer. [ISXB-1356](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1356) ### Changed - Changed default input action asset name from New Controls to New Actions.