From dfb77bc5d912c2577deeac50ec64167a26f92963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Malrat?= Date: Fri, 25 Oct 2024 16:21:50 -0400 Subject: [PATCH 1/2] Fixed autorename mode for new action map on pre 6000 version test ci add changelog --- .../InputSystem.Editor/InputActionsEditorTests.cs | 2 +- .../InputActionsEditorTests.cs.meta | 11 ++++++++++- .../InputSystem.Editor/UIToolkitBaseTestWindow.cs | 2 +- .../UIToolkitBaseTestWindow.cs.meta | 11 ++++++++++- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../Editor/UITKAssetEditor/Views/ActionMapsView.cs | 6 ++++++ 6 files changed, 29 insertions(+), 4 deletions(-) diff --git a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs index ffe160c38f..446d8671d9 100644 --- a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs +++ b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs @@ -1,6 +1,6 @@ // UITK TreeView is not supported in earlier versions // Therefore the UITK version of the InputActionAsset Editor is not available on earlier Editor versions either. -#if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS && UNITY_6000_0_OR_NEWER +#if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS && UNITY_2022_3_OR_NEWER using NUnit.Framework; using System; diff --git a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs.meta b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs.meta index abaccf56c6..6ce6403d42 100644 --- a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs.meta +++ b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 2a061f6298b7df240a1842d1e02a957d \ No newline at end of file +guid: 2a061f6298b7df240a1842d1e02a957d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs b/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs index 172c310318..e05d6a4c08 100644 --- a/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs +++ b/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs @@ -1,6 +1,6 @@ // UITK TreeView is not supported in earlier versions // Therefore the UITK version of the InputActionAsset Editor is not available on earlier Editor versions either. -#if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS && UNITY_6000_0_OR_NEWER +#if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS && UNITY_2022_3_OR_NEWER using NUnit.Framework; using System; diff --git a/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs.meta b/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs.meta index 25c36ff91c..7a3b544b22 100644 --- a/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs.meta +++ b/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs.meta @@ -1,2 +1,11 @@ fileFormatVersion: 2 -guid: 4c58e2699c8ffd54cafdf45f13acf0f9 \ No newline at end of file +guid: 4c58e2699c8ffd54cafdf45f13acf0f9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index edfb394b39..a46d4a5904 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. - Reverted changes from 0ddd534d8 (ISXB-746) which introduced a regression [ISXB-1127](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1127). - Fixed `ArgumentNullException: Value cannot be null.` during the migration of Project-wide Input Actions from `InputManager.asset` to `InputSystem_Actions.inputactions` asset which lead do the lost of the configuration [ISXB-1105](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1105) - Fixed pointerId staying the same when simultaneously releasing and then pressing in the same frame on mobile using touch. [ISXB-1006](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-845) +- Fixed Rename mode is not entered and name is autocompleted to default when creating a new Action Map on 2022.3. [ISXB-1151](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1151) ### Changed - Added back the InputManager to InputSystem project-wide asset migration code with performance improvement (ISX-2086) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs index 3eb1d9efab..2659eaabe1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs @@ -88,7 +88,13 @@ public override void RedrawUI(ViewState viewState) if (actionMapData.HasValue) m_ListView.SetSelection(viewState.actionMapData.IndexOf(actionMapData.Value)); } + // UI toolkit doesn't behave the same on 6000.0 way when refreshing items + // On previous versions, we need to call Rebuild() to refresh the items since refreshItems() is less predicatable +#if UNITY_6000_0_OR_NEWER m_ListView.RefreshItems(); +#else + m_ListView.Rebuild(); +#endif RenameNewActionMaps(); } From b5ce6d95e2f066366f2f574416845a3195bfeb70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Malrat?= Date: Wed, 30 Oct 2024 09:27:25 -0400 Subject: [PATCH 2/2] Revert tests on 2022.3 which is not stable on linux --- .../InputSystem.Editor/InputActionsEditorTests.cs | 2 +- .../InputActionsEditorTests.cs.meta | 11 +---------- .../InputSystem.Editor/UIToolkitBaseTestWindow.cs | 2 +- .../UIToolkitBaseTestWindow.cs.meta | 11 +---------- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs index 446d8671d9..ffe160c38f 100644 --- a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs +++ b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs @@ -1,6 +1,6 @@ // UITK TreeView is not supported in earlier versions // Therefore the UITK version of the InputActionAsset Editor is not available on earlier Editor versions either. -#if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS && UNITY_2022_3_OR_NEWER +#if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS && UNITY_6000_0_OR_NEWER using NUnit.Framework; using System; diff --git a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs.meta b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs.meta index 6ce6403d42..abaccf56c6 100644 --- a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs.meta +++ b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 2a061f6298b7df240a1842d1e02a957d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 2a061f6298b7df240a1842d1e02a957d \ No newline at end of file diff --git a/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs b/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs index e05d6a4c08..172c310318 100644 --- a/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs +++ b/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs @@ -1,6 +1,6 @@ // UITK TreeView is not supported in earlier versions // Therefore the UITK version of the InputActionAsset Editor is not available on earlier Editor versions either. -#if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS && UNITY_2022_3_OR_NEWER +#if UNITY_EDITOR && UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS && UNITY_6000_0_OR_NEWER using NUnit.Framework; using System; diff --git a/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs.meta b/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs.meta index 7a3b544b22..25c36ff91c 100644 --- a/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs.meta +++ b/Assets/Tests/InputSystem.Editor/UIToolkitBaseTestWindow.cs.meta @@ -1,11 +1,2 @@ fileFormatVersion: 2 -guid: 4c58e2699c8ffd54cafdf45f13acf0f9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +guid: 4c58e2699c8ffd54cafdf45f13acf0f9 \ No newline at end of file