From 1dec19968fa9d3ea798229c0da843d630cdebd19 Mon Sep 17 00:00:00 2001 From: JosepMariaPujol Date: Thu, 12 Mar 2026 14:21:18 +0100 Subject: [PATCH 1/4] Fixing warnings 6.6 --- Assets/Tests/InputSystem/Plugins/UITests.cs | 2 +- .../InputSystem/Devices/InputDeviceMatcher.cs | 2 +- .../InputSystem/Editor/Internal/InputStateWindow.cs | 2 +- Packages/com.unity.inputsystem/InputSystem/InputManager.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Tests/InputSystem/Plugins/UITests.cs b/Assets/Tests/InputSystem/Plugins/UITests.cs index 15f17299ea..c99bfcb5f9 100644 --- a/Assets/Tests/InputSystem/Plugins/UITests.cs +++ b/Assets/Tests/InputSystem/Plugins/UITests.cs @@ -4623,7 +4623,7 @@ public override string ToString() } } - public List events = new List(); + [NonSerialized] public List events = new List(); public void OnPointerClick(PointerEventData eventData) { diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs index 2292ad5058..b383d94bfe 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs @@ -562,7 +562,7 @@ internal struct MatcherJson public string[] products; public string version; public string[] versions; - public Capability[] capabilities; + [NonSerialized] public Capability[] capabilities; public struct Capability { diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/InputStateWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/InputStateWindow.cs index 7e4a5fd7a3..7bf32a8fe5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/InputStateWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/InputStateWindow.cs @@ -400,7 +400,7 @@ private void DrawHexDump() // against any mutations. // When inspecting controls (as opposed to events), we copy all their various // state buffers and allow switching between them. - [SerializeField] private byte[][] m_StateBuffers; + [NonSerialized] private byte[][] m_StateBuffers; [SerializeField] private int m_SelectedStateBuffer; [SerializeField] private bool m_CompareStateBuffers; [SerializeField] private bool m_ShowDifferentOnly; diff --git a/Packages/com.unity.inputsystem/InputSystem/InputManager.cs b/Packages/com.unity.inputsystem/InputSystem/InputManager.cs index 90b6dce04e..97ca18ab29 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputManager.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputManager.cs @@ -4329,7 +4329,7 @@ internal struct SerializedState public InputEventHandledPolicy inputEventHandledPolicy; public DeviceState[] devices; public AvailableDevice[] availableDevices; - public InputStateBuffers buffers; + [NonSerialized] public InputStateBuffers buffers; public InputUpdate.SerializedState updateState; public InputUpdateType updateMask; public InputSettings.ScrollDeltaBehavior scrollDeltaBehavior; From b97a54d5cbc66463ab580bd69859bfe42fd59df9 Mon Sep 17 00:00:00 2001 From: JosepMariaPujol Date: Thu, 12 Mar 2026 14:35:43 +0100 Subject: [PATCH 2/4] Fixing warnings 6.6 --- .../Tests/Xbox Controller Basic/Scripts/GamepadButtonState.cs | 3 ++- .../InputSystem.Editor/InputActionReferenceEditorTests.cs | 2 +- .../InputSystem/Devices/Remote/InputRemoting.cs | 2 +- .../Editor/UITKAssetEditor/InputActionsEditorWindow.cs | 2 +- .../InputSystem/Events/InputEventTrace.cs | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Assets/QA/Tests/Xbox Controller Basic/Scripts/GamepadButtonState.cs b/Assets/QA/Tests/Xbox Controller Basic/Scripts/GamepadButtonState.cs index 750e4100ab..bd6b977ef4 100644 --- a/Assets/QA/Tests/Xbox Controller Basic/Scripts/GamepadButtonState.cs +++ b/Assets/QA/Tests/Xbox Controller Basic/Scripts/GamepadButtonState.cs @@ -1,3 +1,4 @@ +using System; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.UI; @@ -6,7 +7,7 @@ public class GamepadButtonState : MonoBehaviour { - public ButtonControl buttonToTrack; + [NonSerialized] public ButtonControl buttonToTrack; [Header("If left empty, will try to auto populate with GetComponent()")] public Image stateImage; diff --git a/Assets/Tests/InputSystem.Editor/InputActionReferenceEditorTests.cs b/Assets/Tests/InputSystem.Editor/InputActionReferenceEditorTests.cs index b8ae447c81..02d2be0f4f 100644 --- a/Assets/Tests/InputSystem.Editor/InputActionReferenceEditorTests.cs +++ b/Assets/Tests/InputSystem.Editor/InputActionReferenceEditorTests.cs @@ -98,7 +98,7 @@ private void DisableDomainReloads() EditorPrefsTestUtils.DisableDomainReload(); } - private static InputActionBehaviour GetBehaviour() => Object.FindFirstObjectByType(); + private static InputActionBehaviour GetBehaviour() => Object.FindAnyObjectByType(); private static InputActionAsset GetAsset() => AssetDatabase.LoadAssetAtPath(assetPath); // For unclear reason, NUnit fails to assert throwing exceptions after transition into play-mode. diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Remote/InputRemoting.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Remote/InputRemoting.cs index 92d2080152..2d4ecb5eb9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Remote/InputRemoting.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Remote/InputRemoting.cs @@ -380,7 +380,7 @@ private enum Flags internal struct RemoteSender { public int senderId; - public InternedString[] layouts; // Each item is the unqualified name of the layout (without namespace) + [NonSerialized] public InternedString[] layouts; // Each item is the unqualified name of the layout (without namespace) public RemoteInputDevice[] devices; } diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index 3dbd534b67..607f03f191 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -19,7 +19,7 @@ static InputActionsEditorWindow() // For UI testing purpose internal InputActionAsset currentAssetInEditor => m_AssetObjectForEditing; [SerializeField] private InputActionAsset m_AssetObjectForEditing; - [SerializeField] private InputActionsEditorState m_State; + [NonSerialized] private InputActionsEditorState m_State; [SerializeField] private string m_AssetGUID; private string m_AssetJson; diff --git a/Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs b/Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs index c8b3a40413..6199d397d7 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Events/InputEventTrace.cs @@ -1564,7 +1564,7 @@ public int stateSizeInBytes [SerializeField] internal int m_DeviceId; [SerializeField] internal string m_Layout; - [SerializeField] internal FourCC m_StateFormat; + [NonSerialized] internal FourCC m_StateFormat; [SerializeField] internal int m_StateSizeInBytes; [SerializeField] internal string m_FullLayoutJson; } From fb373641c7ce1cda556c7fd03d6d2904db498c8a Mon Sep 17 00:00:00 2001 From: josepmariapujol-unity <59828124+josepmariapujol-unity@users.noreply.github.com> Date: Thu, 12 Mar 2026 15:22:32 +0100 Subject: [PATCH 3/4] Change capabilities field to be serialized --- .../InputSystem/Devices/InputDeviceMatcher.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs index b383d94bfe..7a5934965f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs @@ -562,8 +562,9 @@ internal struct MatcherJson public string[] products; public string version; public string[] versions; - [NonSerialized] public Capability[] capabilities; + public Capability[] capabilities; + [Serialized] public struct Capability { public string path; From 2928e934e9e1bbd5098dc4e3b6c6f78583260088 Mon Sep 17 00:00:00 2001 From: JosepMariaPujol Date: Thu, 12 Mar 2026 15:31:16 +0100 Subject: [PATCH 4/4] Revert "Change capabilities field to be serialized" This reverts commit fb373641c7ce1cda556c7fd03d6d2904db498c8a. --- .../InputSystem/Devices/InputDeviceMatcher.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs index 7a5934965f..b383d94bfe 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDeviceMatcher.cs @@ -562,9 +562,8 @@ internal struct MatcherJson public string[] products; public string version; public string[] versions; - public Capability[] capabilities; + [NonSerialized] public Capability[] capabilities; - [Serialized] public struct Capability { public string path;