Skip to content
Closed
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 @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace UnityEngine.InputSystem.Utilities
/// There is a non-zero cost to creating an InternedString. The first time a new unique InternedString
/// is encountered, there may also be a GC heap allocation.
/// </remarks>
[Serializable]
public struct InternedString : IEquatable<InternedString>, IComparable<InternedString>
{
private readonly string m_StringOriginalCase;
Expand Down
Loading