Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void DisableDomainReloads()
EditorPrefsTestUtils.DisableDomainReload();
}

private static InputActionBehaviour GetBehaviour() => Object.FindFirstObjectByType<InputActionBehaviour>();
private static InputActionBehaviour GetBehaviour() => Object.FindAnyObjectByType<InputActionBehaviour>();
private static InputActionAsset GetAsset() => AssetDatabase.LoadAssetAtPath<InputActionAsset>(assetPath);

// For unclear reason, NUnit fails to assert throwing exceptions after transition into play-mode.
Expand Down
1 change: 1 addition & 0 deletions Assets/Tests/InputSystem/Plugins/UITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4601,6 +4601,7 @@ private class UICallbackReceiver : MonoBehaviour, IPointerClickHandler, IPointer
IPointerMoveHandler, IPointerExitHandler, IPointerUpHandler, IMoveHandler, ISelectHandler, IDeselectHandler,
IInitializePotentialDragHandler, IBeginDragHandler, IDragHandler, IEndDragHandler, IDropHandler, ISubmitHandler, ICancelHandler, IScrollHandler
{
[Serializable]
public struct Event
{
public EventType type { get; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Runtime.CompilerServices;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.InputSystem.Processors;
Expand All @@ -16,6 +17,7 @@ namespace UnityEngine.InputSystem.Controls
/// Can optionally be configured to perform normalization.
/// Stored as either a float, a short, a byte, or a single bit.
/// </remarks>
[Serializable]
public class AxisControl : InputControl<float>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Runtime.CompilerServices;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.Scripting;
Expand All @@ -15,6 +16,7 @@ namespace UnityEngine.InputSystem.Controls
/// yield full floating-point values and may thus have a range of values. See
/// <see cref="pressPoint"/> for how button presses on such buttons are handled.
/// </remarks>
[Serializable]
public class ButtonControl : AxisControl
{
private bool m_NeedsToCheckFramePress = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ namespace UnityEngine.InputSystem
/// <seealso cref="InputDevice"/>
/// <seealso cref="InputControlPath"/>
/// <seealso cref="InputStateBlock"/>
[Serializable]
[DebuggerDisplay("{DebuggerDisplay(),nq}")]
public abstract class InputControl
{
Expand Down Expand Up @@ -1283,6 +1284,7 @@ internal virtual IEnumerable<object> GetProcessors()
/// <typeparam name="TValue">Type of value captured by the control. Note that this does not mean
/// that the control has to store data in the given value format. A control that captures float
/// values, for example, may be stored in state as byte values instead.</typeparam>
[Serializable]
public abstract class InputControl<TValue> : InputControl
where TValue : struct
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ private int GetActionMapIndex(InputActionsEditorState state)
return cutActionMapIndex ?? -1;
}
}

[Serializable]
internal struct InputActionsEditorState
{
public int selectedActionMapIndex { get {return m_selectedActionMapIndex; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace UnityEngine.InputSystem.LowLevel
// Internally, we perform only a single combined unmanaged allocation for all state
// buffers needed by the system. Externally, we expose them as if they are each separate
// buffers.
[Serializable]
internal unsafe struct InputStateBuffers
{
// State buffers are set up in a double buffering scheme where the "back buffer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace UnityEngine.InputSystem.Utilities
/// FourCCs are frequently used in the input system to identify the format of data sent to or from
/// the native backend representing events, input device state or commands sent to input devices.
/// </remarks>
[Serializable]
public struct FourCC : IEquatable<FourCC>
{
private int m_Code;
Expand Down
Loading