Skip to content

Commit e1a0db7

Browse files
FIX: InputSystem warnings displayed with Unity editor 6000.6 version (#2381)
1 parent d673990 commit e1a0db7

9 files changed

Lines changed: 13 additions & 2 deletions

File tree

Assets/Tests/InputSystem.Editor/InputActionReferenceEditorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private void DisableDomainReloads()
9898
EditorPrefsTestUtils.DisableDomainReload();
9999
}
100100

101-
private static InputActionBehaviour GetBehaviour() => Object.FindFirstObjectByType<InputActionBehaviour>();
101+
private static InputActionBehaviour GetBehaviour() => Object.FindAnyObjectByType<InputActionBehaviour>();
102102
private static InputActionAsset GetAsset() => AssetDatabase.LoadAssetAtPath<InputActionAsset>(assetPath);
103103

104104
// For unclear reason, NUnit fails to assert throwing exceptions after transition into play-mode.

Assets/Tests/InputSystem/Plugins/UITests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4601,6 +4601,7 @@ private class UICallbackReceiver : MonoBehaviour, IPointerClickHandler, IPointer
46014601
IPointerMoveHandler, IPointerExitHandler, IPointerUpHandler, IMoveHandler, ISelectHandler, IDeselectHandler,
46024602
IInitializePotentialDragHandler, IBeginDragHandler, IDragHandler, IEndDragHandler, IDropHandler, ISubmitHandler, ICancelHandler, IScrollHandler
46034603
{
4604+
[Serializable]
46044605
public struct Event
46054606
{
46064607
public EventType type { get; }

Packages/com.unity.inputsystem/InputSystem/Controls/AxisControl.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Runtime.CompilerServices;
23
using UnityEngine.InputSystem.LowLevel;
34
using UnityEngine.InputSystem.Processors;
@@ -16,6 +17,7 @@ namespace UnityEngine.InputSystem.Controls
1617
/// Can optionally be configured to perform normalization.
1718
/// Stored as either a float, a short, a byte, or a single bit.
1819
/// </remarks>
20+
[Serializable]
1921
public class AxisControl : InputControl<float>
2022
{
2123
/// <summary>

Packages/com.unity.inputsystem/InputSystem/Controls/ButtonControl.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Runtime.CompilerServices;
23
using UnityEngine.InputSystem.LowLevel;
34
using UnityEngine.Scripting;
@@ -15,6 +16,7 @@ namespace UnityEngine.InputSystem.Controls
1516
/// yield full floating-point values and may thus have a range of values. See
1617
/// <see cref="pressPoint"/> for how button presses on such buttons are handled.
1718
/// </remarks>
19+
[Serializable]
1820
public class ButtonControl : AxisControl
1921
{
2022
private bool m_NeedsToCheckFramePress = false;

Packages/com.unity.inputsystem/InputSystem/Controls/InputControl.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ namespace UnityEngine.InputSystem
8383
/// <seealso cref="InputDevice"/>
8484
/// <seealso cref="InputControlPath"/>
8585
/// <seealso cref="InputStateBlock"/>
86+
[Serializable]
8687
[DebuggerDisplay("{DebuggerDisplay(),nq}")]
8788
public abstract class InputControl
8889
{
@@ -1283,6 +1284,7 @@ internal virtual IEnumerable<object> GetProcessors()
12831284
/// <typeparam name="TValue">Type of value captured by the control. Note that this does not mean
12841285
/// that the control has to store data in the given value format. A control that captures float
12851286
/// values, for example, may be stored in state as byte values instead.</typeparam>
1287+
[Serializable]
12861288
public abstract class InputControl<TValue> : InputControl
12871289
where TValue : struct
12881290
{

Packages/com.unity.inputsystem/InputSystem/Editor/Internal/InputStateWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ private void DrawHexDump()
400400
// against any mutations.
401401
// When inspecting controls (as opposed to events), we copy all their various
402402
// state buffers and allow switching between them.
403-
[SerializeField] private byte[][] m_StateBuffers;
403+
[NonSerialized] private byte[][] m_StateBuffers;
404404
[SerializeField] private int m_SelectedStateBuffer;
405405
[SerializeField] private bool m_CompareStateBuffers;
406406
[SerializeField] private bool m_ShowDifferentOnly;

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorState.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ private int GetActionMapIndex(InputActionsEditorState state)
5959
return cutActionMapIndex ?? -1;
6060
}
6161
}
62+
63+
[Serializable]
6264
internal struct InputActionsEditorState
6365
{
6466
public int selectedActionMapIndex { get {return m_selectedActionMapIndex; } }

Packages/com.unity.inputsystem/InputSystem/State/InputStateBuffers.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace UnityEngine.InputSystem.LowLevel
1313
// Internally, we perform only a single combined unmanaged allocation for all state
1414
// buffers needed by the system. Externally, we expose them as if they are each separate
1515
// buffers.
16+
[Serializable]
1617
internal unsafe struct InputStateBuffers
1718
{
1819
// State buffers are set up in a double buffering scheme where the "back buffer"

Packages/com.unity.inputsystem/InputSystem/Utilities/FourCC.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ namespace UnityEngine.InputSystem.Utilities
1111
/// FourCCs are frequently used in the input system to identify the format of data sent to or from
1212
/// the native backend representing events, input device state or commands sent to input devices.
1313
/// </remarks>
14+
[Serializable]
1415
public struct FourCC : IEquatable<FourCC>
1516
{
1617
private int m_Code;

0 commit comments

Comments
 (0)