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/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 26472998e5..9e72ead838 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; [Serializable] public struct Capability 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/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/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index a60b84d1b5..75ca9febcf 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; } 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;