From aaaf3cc14effb7a9b79cce9e574a619399062474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Freire?= Date: Mon, 1 Dec 2025 12:52:24 +0200 Subject: [PATCH 01/33] CHANGE: Set Android jobs to use UTR 1.42 to fix currently failed jobs (#2297) --- .../input-system-mobile-functional-tests.yml | 24 +++++++++++++++++++ .../input-system-mobile-performance-tests.yml | 24 +++++++++++++++++++ Tools/CI/Recipes/MobileBaseRecipe.cs | 7 ++++-- 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/.yamato/input-system-mobile-functional-tests.yml b/.yamato/input-system-mobile-functional-tests.yml index a689daa361..f69ec3096f 100644 --- a/.yamato/input-system-mobile-functional-tests.yml +++ b/.yamato/input-system-mobile-functional-tests.yml @@ -25,6 +25,8 @@ inputsystem-mobilefunctionaltests_-_2022_3_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_2022_3_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 2022.3 - Android - mono inputsystem-mobilefunctionaltests_-_2022_3_-_android_-_mono: @@ -51,6 +53,8 @@ inputsystem-mobilefunctionaltests_-_2022_3_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_2022_3_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 2022.3 - IOS inputsystem-mobilefunctionaltests_-_2022_3_-_ios: @@ -119,6 +123,8 @@ inputsystem-mobilefunctionaltests_-_6000_0_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_0_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.0 - Android - mono inputsystem-mobilefunctionaltests_-_6000_0_-_android_-_mono: @@ -145,6 +151,8 @@ inputsystem-mobilefunctionaltests_-_6000_0_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_0_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.0 - IOS inputsystem-mobilefunctionaltests_-_6000_0_-_ios: @@ -213,6 +221,8 @@ inputsystem-mobilefunctionaltests_-_6000_2_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_2_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.2 - Android - mono inputsystem-mobilefunctionaltests_-_6000_2_-_android_-_mono: @@ -239,6 +249,8 @@ inputsystem-mobilefunctionaltests_-_6000_2_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_2_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.2 - IOS inputsystem-mobilefunctionaltests_-_6000_2_-_ios: @@ -307,6 +319,8 @@ inputsystem-mobilefunctionaltests_-_6000_3_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_3_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.3 - Android - mono inputsystem-mobilefunctionaltests_-_6000_3_-_android_-_mono: @@ -333,6 +347,8 @@ inputsystem-mobilefunctionaltests_-_6000_3_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_3_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.3 - IOS inputsystem-mobilefunctionaltests_-_6000_3_-_ios: @@ -401,6 +417,8 @@ inputsystem-mobilefunctionaltests_-_6000_4_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_4_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.4 - Android - mono inputsystem-mobilefunctionaltests_-_6000_4_-_android_-_mono: @@ -427,6 +445,8 @@ inputsystem-mobilefunctionaltests_-_6000_4_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_4_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.4 - IOS inputsystem-mobilefunctionaltests_-_6000_4_-_ios: @@ -495,6 +515,8 @@ inputsystem-mobilefunctionaltests_-_6000_5_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_5_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.5 - Android - mono inputsystem-mobilefunctionaltests_-_6000_5_-_android_-_mono: @@ -521,6 +543,8 @@ inputsystem-mobilefunctionaltests_-_6000_5_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-functional-build-jobs.yml#inputsystem-mobilefunctionalbuildjobs_-_6000_5_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobileFunctionalTests - 6000.5 - IOS inputsystem-mobilefunctionaltests_-_6000_5_-_ios: diff --git a/.yamato/input-system-mobile-performance-tests.yml b/.yamato/input-system-mobile-performance-tests.yml index d94e69e4b2..2b9ef42a92 100644 --- a/.yamato/input-system-mobile-performance-tests.yml +++ b/.yamato/input-system-mobile-performance-tests.yml @@ -25,6 +25,8 @@ inputsystem-mobileperformancetests_-_2022_3_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_2022_3_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 2022.3 - Android - mono inputsystem-mobileperformancetests_-_2022_3_-_android_-_mono: @@ -51,6 +53,8 @@ inputsystem-mobileperformancetests_-_2022_3_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_2022_3_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 2022.3 - IOS inputsystem-mobileperformancetests_-_2022_3_-_ios: @@ -119,6 +123,8 @@ inputsystem-mobileperformancetests_-_6000_0_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_0_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.0 - Android - mono inputsystem-mobileperformancetests_-_6000_0_-_android_-_mono: @@ -145,6 +151,8 @@ inputsystem-mobileperformancetests_-_6000_0_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_0_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.0 - IOS inputsystem-mobileperformancetests_-_6000_0_-_ios: @@ -213,6 +221,8 @@ inputsystem-mobileperformancetests_-_6000_2_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_2_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.2 - Android - mono inputsystem-mobileperformancetests_-_6000_2_-_android_-_mono: @@ -239,6 +249,8 @@ inputsystem-mobileperformancetests_-_6000_2_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_2_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.2 - IOS inputsystem-mobileperformancetests_-_6000_2_-_ios: @@ -307,6 +319,8 @@ inputsystem-mobileperformancetests_-_6000_3_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_3_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.3 - Android - mono inputsystem-mobileperformancetests_-_6000_3_-_android_-_mono: @@ -333,6 +347,8 @@ inputsystem-mobileperformancetests_-_6000_3_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_3_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.3 - IOS inputsystem-mobileperformancetests_-_6000_3_-_ios: @@ -401,6 +417,8 @@ inputsystem-mobileperformancetests_-_6000_4_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_4_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.4 - Android - mono inputsystem-mobileperformancetests_-_6000_4_-_android_-_mono: @@ -427,6 +445,8 @@ inputsystem-mobileperformancetests_-_6000_4_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_4_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.4 - IOS inputsystem-mobileperformancetests_-_6000_4_-_ios: @@ -495,6 +515,8 @@ inputsystem-mobileperformancetests_-_6000_5_-_android_-_il2cpp: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_5_-_android_-_il2cpp + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.5 - Android - mono inputsystem-mobileperformancetests_-_6000_5_-_android_-_mono: @@ -521,6 +543,8 @@ inputsystem-mobileperformancetests_-_6000_5_-_android_-_mono: - build/test-results/**/* dependencies: - path: .yamato/input-system-mobile-performance-build-jobs.yml#inputsystem-mobileperformancebuildjobs_-_6000_5_-_android_-_mono + variables: + UTR_VERSION: 1.42.0 # InputSystem-MobilePerformanceTests - 6000.5 - IOS inputsystem-mobileperformancetests_-_6000_5_-_ios: diff --git a/Tools/CI/Recipes/MobileBaseRecipe.cs b/Tools/CI/Recipes/MobileBaseRecipe.cs index a2f6d57165..0d8fbaea22 100644 --- a/Tools/CI/Recipes/MobileBaseRecipe.cs +++ b/Tools/CI/Recipes/MobileBaseRecipe.cs @@ -6,7 +6,7 @@ namespace InputSystem.Cookbook.Recipes; -public abstract class MobileBaseRecipe: BaseRecipe +public abstract class MobileBaseRecipe : BaseRecipe { public override IEnumerable GetJobs() { @@ -57,6 +57,9 @@ protected string PrepareUtrExecutable(IJobBuilder job, SystemType systemType) break; job.WithCommands(Settings.AndroidExtraCommands).WithAfterCommands(Settings.AndroidExtraAfterCommands); job.WithCommands(UtrCommand.Download(systemType, "utr.bat")); + // Yet another temporary fix. UTR 1.43.0 was failing on Android builds due to some internal issue so + // we are forcing UTR version 1.42.0 for Android platform. + job.WithEnvironmentVariable("UTR_VERSION", "1.42.0"); return "utr.bat"; case SystemType.IOS: job.WithCommands(UtrCommand.Download(systemType, "utr")); @@ -68,4 +71,4 @@ protected string PrepareUtrExecutable(IJobBuilder job, SystemType systemType) return "UnifiedTestRunner"; } -} \ No newline at end of file +} From 6f1ad166b8006cd5910448e9458fb1f0906d0e56 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Mon, 1 Dec 2025 21:45:15 +0300 Subject: [PATCH 02/33] FIX: Address compilation warnings from Unity 6.4 and 6.5 (#2295) --- Packages/com.unity.inputsystem/CHANGELOG.md | 2 ++ .../Editor/AssetImporter/InputActionImporter.cs | 5 +++++ .../InputActionAssetSearchProvider.cs | 16 +++++++++++----- .../InputActionReferenceSearchProviders.cs | 14 ++++++++++++-- .../Plugins/PlayerInput/PlayerInputEditor.cs | 11 ++++++++++- 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 49fb80f2a1..4e981b4547 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,7 +10,9 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd +### Fixed +- Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395). ## [1.17.0] - 2025-11-25 diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs index e695f2b7eb..126fb83de3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs @@ -328,8 +328,13 @@ internal static IEnumerable LoadInputActionReferencesFromA [MenuItem("Assets/Create/Input Actions")] public static void CreateInputAsset() { + #if UNITY_6000_4_OR_NEWER + ProjectWindowUtil.CreateAssetWithTextContent("New Actions." + InputActionAsset.Extension, + InputActionAsset.kDefaultAssetLayoutJson, InputActionAssetIconLoader.LoadAssetIcon()); + #else ProjectWindowUtil.CreateAssetWithContent("New Actions." + InputActionAsset.Extension, InputActionAsset.kDefaultAssetLayoutJson, InputActionAssetIconLoader.LoadAssetIcon()); + #endif } // File extension of the associated asset diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionAssetSearchProvider.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionAssetSearchProvider.cs index 6604a61287..da94a2d94f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionAssetSearchProvider.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionAssetSearchProvider.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; -using UnityEngine.Search; namespace UnityEngine.InputSystem.Editor { @@ -12,8 +11,6 @@ internal static class InputActionAssetSearchProviders const string k_AssetFolderSearchProviderId = "AssetsInputActionAssetSearchProvider"; const string k_ProjectWideActionsSearchProviderId = "ProjectWideInputActionAssetSearchProvider"; - const string k_ProjectWideAssetIdentificationString = " [Project Wide Input Actions]"; - internal static SearchProvider CreateInputActionAssetSearchProvider() { return CreateInputActionAssetSearchProvider(k_AssetFolderSearchProviderId, @@ -101,7 +98,17 @@ private static IEnumerable FilteredSearch(SearchContext context, Sea if (!label.Contains(context.searchText, System.StringComparison.InvariantCultureIgnoreCase)) continue; // Ignore due to filtering - yield return provider.CreateItem(context, asset.GetInstanceID().ToString(), label, createItemFetchDescription(asset), + + string itemId; + + // 6.4 deprecated instance ids in favour of entity ids + #if UNITY_6000_4_OR_NEWER + itemId = asset.GetEntityId().ToString(); + #else + itemId = asset.GetInstanceID().ToString(); + #endif + + yield return provider.CreateItem(context, itemId, label, createItemFetchDescription(asset), thumbnail, asset); } } @@ -110,7 +117,6 @@ private static IEnumerable FilteredSearch(SearchContext context, Sea // consistent between CreateItem and additional fetchLabel calls. private static string FetchLabel(Object obj) { - // if (obj == InputSystem.actions) return $"{obj.name}{k_ProjectWideAssetIdentificationString}"; return obj.name; } diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferenceSearchProviders.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferenceSearchProviders.cs index 8b66275e70..64725d6e89 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferenceSearchProviders.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferenceSearchProviders.cs @@ -12,7 +12,7 @@ internal static class SearchConstants // SearchFlags: these flags are used to customize how search is performed and how search // results are displayed in the advanced object picker. // Note: SearchFlags.Packages is not currently used and hides all results from packages. - internal static readonly SearchFlags PickerSearchFlags = SearchFlags.Sorted | SearchFlags.OpenPicker; + internal static readonly SearchFlags PickerSearchFlags = SearchFlags.OpenPicker; // Search.SearchViewFlags : these flags are used to customize the appearance of the PickerWindow. internal static readonly Search.SearchViewFlags PickerViewFlags = SearchViewFlags.DisableBuilderModeToggle @@ -84,7 +84,17 @@ private static IEnumerable FilteredSearch(SearchContext context, Sea var label = fetchObjectLabel(asset); if (!label.Contains(context.searchText, System.StringComparison.InvariantCultureIgnoreCase)) continue; // Ignore due to filtering - yield return provider.CreateItem(context, asset.GetInstanceID().ToString(), label, createItemFetchDescription(asset), + + string itemId; + + // 6.4 deprecated instance ids in favour of entity ids + #if UNITY_6000_4_OR_NEWER + itemId = asset.GetEntityId().ToString(); + #else + itemId = asset.GetInstanceID().ToString(); + #endif + + yield return provider.CreateItem(context, itemId, label, createItemFetchDescription(asset), null, asset); } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs index 197d96cbc4..1d2acb500c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs @@ -278,7 +278,16 @@ bool CheckIfActionAssetChanged() { if (m_ActionsProperty.objectReferenceValue != null) { - var assetInstanceID = m_ActionsProperty.objectReferenceValue.GetInstanceID(); + // 6.4 deprecates instance id in favour of entity ids (a class) + // Fortunately, there is an implicit cast from entity id to an integer so we can have minimum footprint for now. + int assetInstanceID; + + #if UNITY_6000_4_OR_NEWER + assetInstanceID = m_ActionsProperty.objectReferenceValue.GetEntityId(); + #else + assetInstanceID = m_ActionsProperty.objectReferenceValue.GetInstanceID(); + #endif + // if the m_ActionAssetInstanceID is 0 the PlayerInputEditor has not been initialized yet, but the asset did not change bool result = assetInstanceID != m_ActionAssetInstanceID && m_ActionAssetInstanceID != 0; m_ActionAssetInstanceID = (int)assetInstanceID; From 05e8e90ef6c377b406393f681ae75be8e0d552e8 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Thu, 11 Dec 2025 15:50:07 +0300 Subject: [PATCH 03/33] FIX: Extra empty lines added in the control bindings drop-down for some mouse buttons (#2299) Co-authored-by: Paulius Dervinis --- Assets/Tests/InputSystem.Editor/UGUITests.cs | 2 +- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../Internal/AdvancedDropdown/AdvancedDropdownDataSource.cs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Tests/InputSystem.Editor/UGUITests.cs b/Assets/Tests/InputSystem.Editor/UGUITests.cs index 6dd636e33f..e189960c1f 100644 --- a/Assets/Tests/InputSystem.Editor/UGUITests.cs +++ b/Assets/Tests/InputSystem.Editor/UGUITests.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR && UNITY_6000_0_OR_NEWER +#if UNITY_EDITOR && UNITY_6000_0_OR_NEWER && UNITY_INPUT_SYSTEM_ENABLE_UI using System; using NUnit.Framework; using UnityEditor; diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 4e981b4547..e4e2d1bbb6 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests. ### Fixed - Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395). +- Fixed extra empty lines being displayed in the control binding list when mouse buttons are pressed [ISXB-1677](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1677) ## [1.17.0] - 2025-11-25 diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/AdvancedDropdown/AdvancedDropdownDataSource.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/AdvancedDropdown/AdvancedDropdownDataSource.cs index 9ecbc3c07e..63552dd619 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/AdvancedDropdown/AdvancedDropdownDataSource.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/AdvancedDropdown/AdvancedDropdownDataSource.cs @@ -118,7 +118,7 @@ private void BuildSearchableElements(AdvancedDropdownItem item) { if (!item.children.Any()) { - if (!item.IsSeparator()) + if (!item.IsSeparator() && item.searchableName.Length > 0) m_SearchableElements.Add(item); return; } From 20d06ce8bd165d47e28a296b84bbe38a2c09426d Mon Sep 17 00:00:00 2001 From: unitALG Date: Thu, 11 Dec 2025 08:34:00 -0500 Subject: [PATCH 04/33] DOCS: DOCATT-8754: Updated TrackedDevice class documentation (#2298) Co-authored-by: Chris Massie <67029035+chris-massie@users.noreply.github.com> --- .../Documentation~/projectMetadata.json | 6 +- .../InputSystem/Devices/TrackedDevice.cs | 64 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/Documentation~/projectMetadata.json b/Packages/com.unity.inputsystem/Documentation~/projectMetadata.json index fe955ab06e..4f4159cec3 100644 --- a/Packages/com.unity.inputsystem/Documentation~/projectMetadata.json +++ b/Packages/com.unity.inputsystem/Documentation~/projectMetadata.json @@ -1,3 +1,7 @@ { - "hideGlobalNamespace": true + "hideGlobalNamespace": true, + "xref": [ + "com.unity.xr.openxr", + "com.unity.xr.interaction.toolkit" + ] } \ No newline at end of file diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/TrackedDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/TrackedDevice.cs index 89153d282a..1e73381881 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/TrackedDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/TrackedDevice.cs @@ -7,17 +7,81 @@ namespace UnityEngine.InputSystem /// /// An input device that has its orientation and position in space tracked. /// + /// + /// These values are typically read from input actions and fed into the + /// [Tracked Pose Driver](xref:input-system-tracked-input-devices#tracked-pose-driver) + /// component rather than being read directly from this class. + /// + /// Refer to the [Starter Assets](xref:xri-samples-starter-assets) + /// sample in the XR Interaction Toolkit package for a Demo Scene with an XR rig + /// hierarchy that uses these concepts. + /// /// /// + /// UnityEngine.XR.OpenXR.Input.Pose [InputControlLayout(displayName = "Tracked Device", isGenericTypeOfDevice = true)] public class TrackedDevice : InputDevice { + /// + /// Indicates which of the tracked pose components are valid by using an integer containing a + /// bitwise OR of the [Unity XR module enum values](https://docs.unity3d.com/ScriptReference/XR.InputTrackingState.html), + /// for example `InputTrackingState.Position | InputTrackingState.Rotation`. + /// + /// + /// This property determines whether you can retrieve valid values from the + /// and the properties: + /// - The Position bit must be set for the property to have a valid Vector3 value. + /// - The Rotation bit must be set for the property to have a valid Quaternion. + /// [InputControl(synthetic = true)] public IntegerControl trackingState { get; protected set; } + + /// + /// Indicates whether the input device is actively tracked (1) or not (0). + /// + /// + /// For more information about how OpenXR represents inferred position vs. actual position, refer to + /// [Reference Spaces](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#spaces-reference-spaces) + /// (OpenXR Specification). + /// [InputControl(synthetic = true)] public ButtonControl isTracked { get; protected set; } + + /// + /// Represents the position portion of the input device's primary + /// [pose](xref:input-system-tracked-input-devices#tracked-pose-driver). For an HMD + /// device, this means the "center" eye pose. For XR controllers, it means the "grip" pose. + /// + /// + /// For more information about how OpenXR represents the grip pose, refer to + /// [Standard pose identifiers](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#semantic-paths-standard-identifiers) + /// (OpenXR Specification). + /// + /// > [!NOTE] + /// > The position value is in the tracking space reported by the device, which doesn't match + /// > Unity world space. Using a combination of the XR Origin component with the + /// > [Tracked Pose Driver](xref:input-system-tracked-input-devices#tracked-pose-driver) component + /// > to manage that conversion automatically is more reliable than managing it through scripting. + /// [InputControl(noisy = true, dontReset = true)] public Vector3Control devicePosition { get; protected set; } + + /// + /// Represents the rotation portion of the input device's primary + /// [pose](xref:openxr-input#pose-data). For an HMD + /// device, this means the "center" eye pose. For XR controllers, it means the "grip" pose. + /// + /// + /// For more information about how OpenXR represents the grip pose, refer to + /// [Standard pose identifiers](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#semantic-paths-standard-identifiers) + /// (OpenXR Specification). + /// + /// > [!NOTE] + /// > The rotation value is in the tracking space reported by the device, which doesn't match + /// > Unity world space. Using a combination of the XR Origin component with the + /// > [Tracked Pose Driver](xref:input-system-tracked-input-devices#tracked-pose-driver) component + /// > to manage that conversion automatically is more reliable than managing it through scripting. + /// [InputControl(noisy = true, dontReset = true)] public QuaternionControl deviceRotation { get; protected set; } From ad95eca7b6356725601e8bf115cebf2d504cd4d5 Mon Sep 17 00:00:00 2001 From: Steve Diniro <95724601+SteveDiniro@users.noreply.github.com> Date: Mon, 15 Dec 2025 01:54:05 -0500 Subject: [PATCH 05/33] DOCS: Update documentation to reflect support for PS5 controller on Linux (#2300) --- Packages/com.unity.inputsystem/CHANGELOG.md | 4 ++ .../Documentation~/SupportedDevices.md | 45 +++++++++++++++++-- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index e4e2d1bbb6..fe83a9780c 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -15,6 +15,10 @@ however, it has to be formatted properly to pass verification tests. - Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395). - Fixed extra empty lines being displayed in the control binding list when mouse buttons are pressed [ISXB-1677](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1677) +### Changed + +- Updated documentation to reflect PS5 controller support on Linux. + ## [1.17.0] - 2025-11-25 ### Changed diff --git a/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md b/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md index 00731553ff..e5085d7cb5 100644 --- a/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md +++ b/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md @@ -31,7 +31,7 @@ Support for the following Devices doesn't require specialized support of particu |Xbox 360 (4)|Yes|Yes (3)|Yes|Yes|No|No|No|Yes|No|No|Sometimes (2)| |Xbox One|Yes (1)|Yes (3)|Yes (1)|Yes|Yes (1)|Yes (6)|Yes (6)|Yes|No|No|Sometimes (2)| |PS3/PS4|Yes (5)|Yes (5)|Yes (5)|Yes (5)|Yes (5, 8)|Yes (5, 6)|Yes (5, 6)|No|Yes|No|Sometimes (2)| -|PS5|Yes (11)|Yes (11)|No (11)|Yes (11)|Yes (9, 11)|No (11)|No (11)|No|Yes|No|Sometimes (2)| +|PS5|Yes (11)|Yes (11)|Yes (11)|Yes (11)|Yes (9, 11)|No (11)|No (11)|No|Yes|No|Sometimes (2)| |Switch|Yes (10)|Yes (10)|Yes|Yes|No|No|No|No|No|Yes|Sometimes (2)| |MFi (such as SteelSeries)|No|Sometimes (12)|No|No|No|Yes|Yes|No|No|No|No| @@ -40,15 +40,15 @@ Support for the following Devices doesn't require specialized support of particu > 2. WebGL support varies between browsers, Devices, and operating systems. > 3. XInput controllers on macOS currently require the installation of the [Xbox Controller Driver for macOS](https://github.com/360Controller/360Controller). This driver only supports only USB connections, and doesn't support wireless dongles. However, the latest generation of Xbox One controllers natively support Bluetooth, and are natively supported on Macs as HIDs without any additional drivers when connected via Bluetooth. > 4. This includes any XInput-compatible Device. -> 5. Unity doesn't support motor rumble and lightbar color over Bluetooth. Unity doesn't support the gyro or accelerometer on PS4/PS5 controllers on platforms other than the PlayStation consoles. Unity also doesn't support the DualShock 4 USB Wireless Adapter. On UWP, only USB connection is supported, motor rumble and lightbar are not working correctly. +> 5. Unity doesn't support motor rumble and light bar color over Bluetooth. Unity doesn't support the gyro or accelerometer on PS4/PS5 controllers on platforms other than the PlayStation consoles. Unity also doesn't support the DualShock 4 USB Wireless Adapter. On UWP, only USB connection is supported, motor rumble and light bar are not working correctly. > 6. Unity supports Made for iOS (MFi) certified controllers on iOS. Xbox One and PS4 controllers are only supported on iOS 13 or higher. > 7. Consoles are supported using separate packages. You need to install these packages in your Project to enable console support. > 8. Unity supports PS4 controllers on Android devices running [Android 10 or higher](https://playstation.com/en-us/support/hardware/ps4-pair-dualshock-4-wireless-with-sony-xperia-and-android). > 9. Unity supports PS5 controllers on Android devices running [Android 12 or higher](https://playstation.com/en-gb/support/hardware/pair-dualsense-controller-bluetooth/). > 10. Switch Joy-Cons are not currently supported on Windows and Mac. Some of official accessories are supported on Windows and Mac: "Hori Co HORIPAD for Nintendo Switch", "HORI Pokken Tournament DX Pro Pad", "HORI Wireless Switch Pad", "HORI Real Arcade Pro V Hayabusa in Switch Mode", "PowerA NSW Fusion Wired FightPad", "PowerA NSW Fusion Pro Controller (USB only)", "PDP Wired Fight Pad Pro: Mario", "PDP Faceoff Wired Pro Controller for Nintendo Switch", "PDP Faceoff Deluxe Wired Pro Controller for Nintendo Switch", "PDP Afterglow Wireless Switch Controller", "PDP Rockcandy Wired Controller". -> 11. PS5 DualSense is supported on Windows and macOS via USB HID, though setting motor rumble and lightbar color when connected over Bluetooth is currently not supported. +> 11. PS5 DualSense is supported on Windows, macOS, and Linux via USB HID. Linux support begins with Unity Editor 6000.4 (refer to [PS5 controller support on Linux](#ps5-controller-support-on-linux)). On all platforms, setting motor rumble and light bar color when connected over Bluetooth is currently not supported. > 12. SteelSeries Nimbus+ supported via HID on macOS. -> - On UWP only USB connection is supported, motor rumble and lightbar are not working correctly. +> - On UWP only USB connection is supported, motor rumble and light bar are not working correctly. > - On Android it's expected to be working from Android 12. > - On iOS/tvOS it's currently recognized as a generic gamepad and most controls do work. > 13. To ensure all controller types are detected on UWP, enable the HumanInterfaceDevice setting in [UWP Player Settings](https://docs.unity3d.com/Manual/class-PlayerSettingsWSA.html#Capabilities). @@ -65,3 +65,40 @@ Support varies between browsers, Devices, and operating systems, and further dif ## Other gamepads, joysticks, and racing wheels The Input System supports any Device which implements the USB HID specification. However, for Devices which don't have specific [layouts](xref:input-system-layouts) implemented in the Input System, the system can only surface the information available from the HID descriptor of the Device, which limits how precisely it can describe a control. These Devices often work best when allowing the user to [manually remap the controls](xref:UnityEngine.InputSystem.InputActionRebindingExtensions). If you need to support a specific Device, you can also [add your own mapping for it](xref:input-system-hid#creating-a-custom-device-layout). See documentation on [HID](xref:input-system-hid) for more information. + +## PS5 controller support on Linux + +Some Linux distributions restrict access to HIDRAW devices by default. If your user account doesn't have permission to access the PS5 controller through HIDRAW, Unity will fall back to treating the controller as a standard gamepad. + +> [!NOTE] +> When Unity falls back to treating the controller as a standard gamepad, advanced PS5 features, such as light bar, will not be available. + +If your PS5 controller isn't detected through the HID subsystem, follow these steps to grant the necessary permissions: + +1. Open the terminal and create the following `udev` rule file: + ``` + sudo nano /etc/udev/rules.d/70-sony-controllers.rules + ``` + +2. Add the following lines to the `.rules` file. Save the file, then exit the nano editor. + ``` + # PS5 DualSense Edge + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0df2", GROUP="gamepad", MODE="0660" + + # PS5 DualSense + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ce6", GROUP="gamepad", MODE="0660" + ``` + +3. Grant the current user access to PS5 gamepads: + ``` + sudo groupadd gamepad + sudo usermod -aG gamepad $USER + ``` + +4. Apply the new `udev` rules: + ``` + sudo udevadm control --reload-rules + sudo udevadm trigger + ``` + +5. Log out from the current session and log back in. This step is required for the session to recognize the updated group membership. From 3b7340ffb13b542b99afc26e462830b30717a1d9 Mon Sep 17 00:00:00 2001 From: Darren-Kelly-Unity <118264423+Darren-Kelly-Unity@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:58:13 +0100 Subject: [PATCH 06/33] FIX: out of range exception when pressing undo after creating and editing a new control scheme (ISXB-1607) (#2237) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: HÃ¥kan Sidenvall --- .../InputActionsEditorTests.cs | 24 ++++++++++++++++ Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../Commands/ControlSchemeCommands.cs | 14 +++++++--- .../Views/ControlSchemesView.cs | 3 +- .../Views/InputActionsEditorView.cs | 28 +++++++++++++------ 5 files changed, 56 insertions(+), 14 deletions(-) diff --git a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs index 5d31d5e306..96a51f9a7a 100644 --- a/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs +++ b/Assets/Tests/InputSystem.Editor/InputActionsEditorTests.cs @@ -19,6 +19,7 @@ public override void OneTimeSetUp() { base.OneTimeSetUp(); m_Asset = AssetDatabaseUtils.CreateAsset(); + m_Asset.AddControlScheme(new InputControlScheme("test")); var actionMap = m_Asset.AddActionMap("First Name"); m_Asset.AddActionMap("Second Name"); m_Asset.AddActionMap("Third Name"); @@ -234,5 +235,28 @@ public IEnumerator CanRenameAction() // Check on the asset side Assert.That(m_Window.currentAssetInEditor.actionMaps[0].actions[1].name, Is.EqualTo("New Name")); } + + /// + /// ISXB-1607 + /// Fix an out of range exception when pressing undo after creating and editing a new control scheme. + /// + /// + [UnityTest] + [Ignore("Currently this is difficult to test, Darren - re-visit once we have converted the advanced dropdown to UIToolkit")] + public IEnumerator CanUndoActionMap_ControlSchemeEdit() + { + var controlSchemeToolbarMenu = m_Window.rootVisualElement.Q("control-schemes-toolbar-menu"); + + // changing the selection triggers a state change, wait for the scheduler to process the frame + yield return WaitForSchedulerLoop(); + yield return WaitForNotDirty(); + + SimulateClickOn(controlSchemeToolbarMenu); + + yield return WaitForSchedulerLoop(); + yield return WaitForNotDirty(); + + yield return WaitForFocus(m_Window.rootVisualElement.Q("control-schemes-toolbar-menu")); + } } #endif diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index fe83a9780c..6128de11b3 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -84,6 +84,7 @@ however, it has to be formatted properly to pass verification tests. - Fixed the compilation warnings when used with Unity 6.4 (ISX-2349). - Fixed an issue where `InputSystemUIInputModule.localMultiPlayerRoot` could not be set to `null` when using `MultiplayerEventSystem`. [ISXB-1610](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1610) - 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 an ArgumentOutOfRangeException that was thrown when pressing the undo shortcut while changing a control scheme name. [ISXB-1607](https://issuetracker.unity3d.com/issues/argumentoutofrangeexception-error-is-thrown-when-pressing-the-undo-shortcut-while-changing-the-control-scheme-name) - Fixed an issue where the onAnyButtonPress callback would be triggered multiple times during unrelated events when a button is held down. See [ISXB-1005](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1005). - 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. diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Commands/ControlSchemeCommands.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Commands/ControlSchemeCommands.cs index 6b0ba03687..75aac494d3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Commands/ControlSchemeCommands.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Commands/ControlSchemeCommands.cs @@ -145,10 +145,16 @@ public static Command ResetSelectedControlScheme() { return (in InputActionsEditorState state) => { - var controlSchemeSerializedProperty = state.selectedControlSchemeIndex == -1 ? null : - state.serializedObject - .FindProperty(nameof(InputActionAsset.m_ControlSchemes)) - .GetArrayElementAtIndex(state.selectedControlSchemeIndex); + SerializedProperty controlSchemeSerializedProperty = null; + var serializedProperty = state.serializedObject + .FindProperty(nameof(InputActionAsset.m_ControlSchemes)); + + if (state.selectedControlSchemeIndex < serializedProperty.arraySize) + { + controlSchemeSerializedProperty = state.selectedControlSchemeIndex == -1 ? null : + serializedProperty + .GetArrayElementAtIndex(state.selectedControlSchemeIndex); + } if (controlSchemeSerializedProperty == null) { diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ControlSchemesView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ControlSchemesView.cs index 9b2057c7ac..ba1550a9ef 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ControlSchemesView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ControlSchemesView.cs @@ -108,7 +108,6 @@ private void RemoveDeviceRequirement() public override void RedrawUI(InputControlScheme viewState) { rootElement.Q(kControlSchemeNameTextField).value = string.IsNullOrEmpty(m_NewName) ? viewState.name : m_NewName; - m_ListView.itemsSource?.Clear(); m_ListView.itemsSource = viewState.deviceRequirements.Count > 0 ? viewState.deviceRequirements.Select(r => (r.controlPath, r.isOptional)).ToList() : @@ -128,7 +127,7 @@ private void SaveAndClose() CloseView(); } - private void Cancel() + internal void Cancel() { // Reload the selected ControlScheme values from the SerilaizedProperty and throw away any changes Dispatch(ControlSchemeCommands.ResetSelectedControlScheme()); diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs index e94e7427f9..1f1fd66d52 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs @@ -24,6 +24,8 @@ internal class InputActionsEditorView : ViewBase SelectControlScheme(-1), viewState.selectedControlSchemeIndex == -1 ? DropdownMenuAction.Status.Checked : DropdownMenuAction.Status.Normal); @@ -186,7 +194,7 @@ private void SetUpDevicesMenu(ViewState viewState) return; } m_DevicesToolbar.SetEnabled(true); - var currentControlScheme = viewState.controlSchemes.ElementAt(viewState.selectedControlSchemeIndex); + var currentControlScheme = viewState.controlSchemes.ElementAtOrDefault(viewState.selectedControlSchemeIndex); if (viewState.selectedDeviceIndex == -1) m_DevicesToolbar.text = "All Devices"; @@ -228,10 +236,13 @@ private void DeleteControlScheme(DropdownMenuAction obj) private void ShowControlSchemeEditor(VisualElement parent, bool updateExisting = false) { - var controlSchemesView = CreateChildView(new ControlSchemesView(parent, stateContainer, updateExisting)); - controlSchemesView.UpdateView(stateContainer.GetState()); - - controlSchemesView.OnClosing += _ => DestroyChildView(controlSchemesView); + m_ControlSchemesView = CreateChildView(new ControlSchemesView(parent, stateContainer, updateExisting)); + m_ControlSchemesView.UpdateView(stateContainer.GetState()); + m_ControlSchemesView.OnClosing += _ => + { + DestroyChildView(m_ControlSchemesView); + m_ControlSchemesView = null; + }; } private void SelectControlScheme(int controlSchemeIndex) @@ -258,6 +269,7 @@ public override void DestroyView() { base.DestroyView(); s_OnPasteCutElements.Remove(this); + Undo.undoRedoPerformed -= CloseControlSchemeView; } public void OnPaste(InputActionsEditorState state) From 55bc806bf47a021cd7010c0ed6cc1bedcd829cfb Mon Sep 17 00:00:00 2001 From: Darren-Kelly-Unity <118264423+Darren-Kelly-Unity@users.noreply.github.com> Date: Tue, 16 Dec 2025 15:13:40 +0100 Subject: [PATCH 07/33] FIX: Autosave closes add control scheme ui element on save. (ISXB-1713) (#2268) --- .../InputActionsEditorSettingsProvider.cs | 10 +++++++++- .../Editor/UITKAssetEditor/InputActionsEditorWindow.cs | 8 ++++---- .../UITKAssetEditor/Views/InputActionsEditorView.cs | 6 ++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs index d5b5d12094..e27c12cc6f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorSettingsProvider.cs @@ -175,7 +175,15 @@ private void OnFocusOut(FocusOutEvent @event = null) private void ValidateAndSaveAsset(InputActionAsset asset) { - ProjectWideActionsAsset.Verify(asset); // Ignore verification result for save + // This code should be cleaned up once we migrate the InputControl stuff from ImGUI completely. + // Since at that point it stops being a separate window that steals focus. + // (See case ISXB-1713) + if (!InputEditorUserSettings.autoSaveInputActionAssets || m_View.IsControlSchemeViewActive()) + { + return; + } + + ProjectWideActionsAsset.Verify(asset); // Ignore verification result for save EditorHelpers.SaveAsset(AssetDatabase.GetAssetPath(asset), asset.ToJson()); } diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index ae6e80c63a..41e890533a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -256,7 +256,6 @@ private void BuildUI() if (!rootVisualElement.styleSheets.Contains(InputActionsEditorWindowUtils.theme)) rootVisualElement.styleSheets.Add(InputActionsEditorWindowUtils.theme); m_View = new InputActionsEditorView(rootVisualElement, m_StateContainer, false, () => Save(isAutoSave: false)); - m_StateContainer.Initialize(rootVisualElement.Q("action-editor")); } @@ -334,8 +333,10 @@ private void OnLostFocus() // This code should be cleaned up once we migrate the InputControl stuff from ImGUI completely. // Since at that point it stops being a separate window that steals focus. // (See case ISXB-1221) - if (!InputControlPathEditor.IsShowingDropdown) + if (!InputControlPathEditor.IsShowingDropdown && !m_View.IsControlSchemeViewActive()) + { Save(isAutoSave: true); + } } analytics.RegisterEditorFocusOut(); @@ -415,8 +416,7 @@ private bool TryUpdateFromAsset() var assetPath = AssetDatabase.GUIDToAssetPath(m_AssetGUID); if (assetPath == null) { - Debug.LogWarning( - $"Failed to open InputActionAsset with GUID {m_AssetGUID}. The asset might have been deleted."); + Debug.LogWarning($"Failed to open InputActionAsset with GUID {m_AssetGUID}. The asset might have been deleted."); return false; } diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs index 1f1fd66d52..d36d82ef78 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/InputActionsEditorView.cs @@ -115,6 +115,11 @@ private void CloseControlSchemeView() m_ControlSchemesView?.Cancel(); } + public bool IsControlSchemeViewActive() + { + return m_ControlSchemesView != null; + } + private void OnReset() { Dispatch(Commands.ReplaceActionMaps(ProjectWideActionsAsset.GetDefaultAssetJson())); @@ -238,6 +243,7 @@ private void ShowControlSchemeEditor(VisualElement parent, bool updateExisting = { m_ControlSchemesView = CreateChildView(new ControlSchemesView(parent, stateContainer, updateExisting)); m_ControlSchemesView.UpdateView(stateContainer.GetState()); + m_ControlSchemesView.OnClosing += _ => { DestroyChildView(m_ControlSchemesView); From e8095ae15684430e8f769d093eda9f2c804f4846 Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Tue, 16 Dec 2025 17:52:33 +0100 Subject: [PATCH 08/33] DOCS: Update documentation for MonoBehaviour OnMouse events (ISX-2383) (#2301) Co-authored-by: JonMUnity <98557365+JonMUnity@users.noreply.github.com> --- Packages/com.unity.inputsystem/CHANGELOG.md | 4 ++++ .../com.unity.inputsystem/Documentation~/KnownLimitations.md | 1 - Packages/com.unity.inputsystem/Documentation~/Migration.md | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 6128de11b3..751d997e06 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,6 +10,10 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd +### Changed + +- Updated documentation to reflect that the OnMouse MonoBehaviour events are now supported in Unity 6.4 and above. + ### Fixed - Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395). diff --git a/Packages/com.unity.inputsystem/Documentation~/KnownLimitations.md b/Packages/com.unity.inputsystem/Documentation~/KnownLimitations.md index 770dfae231..7b1e358c53 100644 --- a/Packages/com.unity.inputsystem/Documentation~/KnownLimitations.md +++ b/Packages/com.unity.inputsystem/Documentation~/KnownLimitations.md @@ -34,5 +34,4 @@ The following is a list of known limitations that the Input System currently has ## Features Supported by Old Input Manager -* `MonoBehaviour` mouse methods (`OnMouseEnter`, `OnMouseDrag`, etc) will not be called by the Input System. * Unity Remote doesn't currently support the Input System. This is being worked on. diff --git a/Packages/com.unity.inputsystem/Documentation~/Migration.md b/Packages/com.unity.inputsystem/Documentation~/Migration.md index 20a8486cd6..883ff37a07 100644 --- a/Packages/com.unity.inputsystem/Documentation~/Migration.md +++ b/Packages/com.unity.inputsystem/Documentation~/Migration.md @@ -99,6 +99,8 @@ Directly reading hardware controls bypasses the new Input System's action-based ### Mouse +`MonoBehaviour.OnMouse` events, such as [MonoBehaviour.OnMouseDown](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnMouseDown.html), are supported in Unity 6.4 and later. + |Input Manager (Old)|Input System (New)| |--|--| [`Input.GetMouseButton`](https://docs.unity3d.com/ScriptReference/Input.GetMouseButton.html)
Example: `Input.GetMouseButton(0)`|Use [`isPressed`](xref:UnityEngine.InputSystem.Controls.ButtonControl.isPressed) on the corresponding mouse button.
Example: `InputSystem.Mouse.current.leftButton.isPressed` From 0c39606719d02a28979d37bc550bd366f96f303f Mon Sep 17 00:00:00 2001 From: Morgan Hoarau <122548697+MorganHoarau@users.noreply.github.com> Date: Wed, 17 Dec 2025 10:57:48 +0000 Subject: [PATCH 09/33] FIX: InputActionReference not set on Prefab and ScriptableObject (ISBX-1787) (#2303) --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../PropertyDrawers/InputActionReferencePropertyDrawer.cs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 751d997e06..7570433300 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -18,6 +18,7 @@ however, it has to be formatted properly to pass verification tests. - Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395). - Fixed extra empty lines being displayed in the control binding list when mouse buttons are pressed [ISXB-1677](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1677) +- Fixed InputActionReference not being set when attempting to set it on a Prefab or ScriptableObject [ISXB-1787](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1787) ### Changed diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs index b660547db6..540422e27a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs @@ -48,9 +48,7 @@ public void OnGUI(Rect position, SerializedProperty property, GUIContent label, // Only assign the value was actually changed by the user. if (EditorGUI.EndChangeCheck() && !Equals(candidate, current)) { - var reference = candidate as InputActionReference; - property.objectReferenceValue = reference ? - InputActionReference.Create(reference.action) : null; + property.objectReferenceValue = candidate as InputActionReference; // set to either the reference or null. } EditorGUI.EndProperty(); From 71886a64bc8b13990fb1b6db985679aab76887ad Mon Sep 17 00:00:00 2001 From: Rita Merkl <127492464+ritamerkl@users.noreply.github.com> Date: Thu, 18 Dec 2025 10:19:05 +0100 Subject: [PATCH 10/33] DOCS: Update to clarify that Linux supports touchscreen (#2304) --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../com.unity.inputsystem/Documentation~/SupportedDevices.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 7570433300..d9b24b08b1 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests. ### Changed - Updated documentation to reflect that the OnMouse MonoBehaviour events are now supported in Unity 6.4 and above. +- Updated the supported devices documentation to clarify that touchscreens are supported on Linux. ### Fixed diff --git a/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md b/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md index e5085d7cb5..3f6f0af710 100644 --- a/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md +++ b/Packages/com.unity.inputsystem/Documentation~/SupportedDevices.md @@ -14,7 +14,7 @@ Support for the following Devices doesn't require specialized support of particu |[Mouse](xref:input-system-mouse)|Yes|Yes|Yes|Yes|Yes|No|No|Yes|Yes|No|Yes| |[Keyboard](xref:input-system-keyboard)|Yes|Yes|Yes|Yes|Yes|No|No|Yes|Yes|No|Yes| |[Pen](xref:input-system-pen)|Yes|No |No|Yes|Yes|Yes|No|No|No|No|No| -|[Touchscreen](xref:input-system-touch)|Yes|No|No|Yes|Yes|Yes|Yes(4)|No|No|No|Yes| +|[Touchscreen](xref:input-system-touch)|Yes|No|Yes|Yes|Yes|Yes|Yes(4)|No|No|No|Yes| |[Sensors](xref:input-system-sensors)|No|No|No|No|Yes|Yes|No|No|No|No|Yes(5)| |[Joystick](#other-gamepads-joysticks-and-racing-wheels) (2)|Yes|Yes|Yes|Yes|Yes|No|No|No|No|No|Yes| From a9d60ae690fd3b52c4f896d6d8146c06ee1d05d6 Mon Sep 17 00:00:00 2001 From: josepmariapujol-unity <59828124+josepmariapujol-unity@users.noreply.github.com> Date: Thu, 18 Dec 2025 17:56:54 +0100 Subject: [PATCH 11/33] FIX: UI inconsistencies - Add buttons use add icon in input actions window (1/x) (#2302) --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../InputActionMapsTreeViewItem.uxml | 2 +- .../PackageResources/InputActionsEditor.uxml | 6 +++--- .../InputActionsEditorStyles.uss | 18 ++++++++++++++++++ .../UITKAssetEditor/Views/ActionMapsView.cs | 3 +++ .../UITKAssetEditor/Views/ActionsTreeView.cs | 1 + .../UITKAssetEditor/Views/PropertiesView.cs | 5 ++++- 7 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index d9b24b08b1..7b909f99c8 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -17,6 +17,7 @@ however, it has to be formatted properly to pass verification tests. ### Fixed +- Fixed add buttons use add icon in input actions window (ISX-2340) - Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395). - Fixed extra empty lines being displayed in the control binding list when mouse buttons are pressed [ISXB-1677](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1677) - Fixed InputActionReference not being set when attempting to set it on a Prefab or ScriptableObject [ISXB-1787](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1787) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionMapsTreeViewItem.uxml b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionMapsTreeViewItem.uxml index a26d706df2..8a903683ab 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionMapsTreeViewItem.uxml +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionMapsTreeViewItem.uxml @@ -5,6 +5,6 @@ - + diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionsEditor.uxml b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionsEditor.uxml index 829d2448b2..80e0c183e1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionsEditor.uxml +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionsEditor.uxml @@ -21,18 +21,18 @@ - + - + - + diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionsEditorStyles.uss b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionsEditorStyles.uss index dddbfb9c11..3d9e87a5d6 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionsEditorStyles.uss +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/PackageResources/InputActionsEditorStyles.uss @@ -175,15 +175,33 @@ } .add-binging-button-dark-theme { + width: 14px; + height: 14px; background-image: resource('d_Toolbar Plus More.png'); -unity-background-scale-mode: scale-to-fit; } .add-binging-button { + width: 14px; + height: 14px; background-image: resource('Toolbar Plus More.png'); -unity-background-scale-mode: scale-to-fit; } +.add-button-dark-theme { + width: 18px; + height: 18px; + background-image: resource('d_Toolbar Plus.png'); + -unity-background-scale-mode: scale-to-fit; +} + +.add-button { + width: 18px; + height: 18px; + background-image: resource('Toolbar Plus.png'); + -unity-background-scale-mode: scale-to-fit; +} + .search-field { display: none; width: 190px; 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 a663a4a81f..5fded27b9a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs @@ -2,6 +2,7 @@ using CmdEvents = UnityEngine.InputSystem.Editor.InputActionsEditorConstants.CommandEvents; using System.Collections.Generic; using System.Linq; +using UnityEditor; using UnityEngine.UIElements; namespace UnityEngine.InputSystem.Editor @@ -65,6 +66,8 @@ public ActionMapsView(VisualElement root, StateContainer stateContainer) CreateSelector(Selectors.GetActionMapNames, Selectors.GetSelectedActionMap, (actionMapNames, actionMap, state) => new ViewState(actionMap, actionMapNames, state.GetDisabledActionMaps(actionMapNames.ToList()))); m_AddActionMapButton = root.Q