Skip to content

Commit 0edc347

Browse files
committed
fix CI failures
1 parent e2d5fd2 commit 0edc347

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@ namespace UnityEngine.InputSystem
5858
/// </remarks>
5959
/// <example>
6060
/// <code>
61-
/// // Add a "synthetic" gamepad that isn't actually backed by hardware.
62-
/// var gamepad = InputSystem.AddDevice&lt;Gamepad&gt;();
63-
/// </code>
64-
/// </example>
65-
/// <example>
66-
/// <code>
61+
/// using System.Runtime.InteropServices;
62+
/// using UnityEditor;
63+
/// using UnityEngine;
64+
/// using UnityEngine.InputSystem;
65+
/// using UnityEngine.InputSystem.Controls;
66+
/// using UnityEngine.InputSystem.Layouts;
67+
/// using UnityEngine.InputSystem.LowLevel;
68+
/// using UnityEngine.InputSystem.Utilities;
69+
///
6770
/// // InputControlLayoutAttribute attribute is only necessary if you want
6871
/// // to override default behavior that occurs when registering your device
6972
/// // as a layout.
@@ -78,6 +81,9 @@ namespace UnityEngine.InputSystem
7881
/// public ButtonControl button { get; private set; }
7982
/// public AxisControl axis { get; private set; }
8083
///
84+
/// // This is an example on how to add a "synthetic" gamepad that isn't actually backed by hardware.
85+
/// Gamepad gamepad = InputSystem.AddDevice&lt;Gamepad&gt;();
86+
///
8187
/// // Register the device.
8288
/// static MyDevice()
8389
/// {
@@ -121,20 +127,20 @@ namespace UnityEngine.InputSystem
121127
/// // particular device is connected and fed into the input system.
122128
/// // The format is a simple FourCC code that "tags" state memory blocks for the
123129
/// // device to give a base level of safety checks on memory operations.
124-
/// public FourCC format => return new FourCC('H', 'I', 'D');
130+
/// public FourCC format => new FourCC('H', 'I', 'D');
125131
///
126132
/// // InputControlAttributes on fields tell the input system to create controls
127133
/// // for the public fields found in the struct.
128134
///
129135
/// // Assume a 16bit field of buttons. Create one button that is tied to
130136
/// // bit #3 (zero-based). Note that buttons do not need to be stored as bits.
131137
/// // They can also be stored as floats or shorts, for example.
132-
/// [InputControl(name = "button", layout = "Button", bit = 3)]
138+
/// [InputControl(name = "button", layout = "Button", bit = 3)] [FieldOffset(0)]
133139
/// public ushort buttons;
134140
///
135141
/// // Create a floating-point axis. The name, if not supplied, is taken from
136142
/// // the field.
137-
/// [InputControl(layout = "Axis")]
143+
/// [InputControl(layout = "Axis")] [FieldOffset(0)]
138144
/// public short axis;
139145
/// }
140146
/// </code>

Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ namespace UnityEngine.InputSystem.LowLevel
3535
/// }
3636
/// </code>
3737
/// </example>
38-
/// <see cref="Keyboard"/>
38+
/// <seealso cref="Keyboard"/>
3939
// NOTE: This layout has to match the KeyboardInputState layout used in native!
4040
[StructLayout(LayoutKind.Sequential)]
4141
public unsafe struct KeyboardState : IInputStateTypeInfo
4242
{
4343
/// <summary>
4444
/// Memory format tag for KeyboardState. Returns "KEYS".
4545
/// </summary>
46-
/// <see cref="InputStateBlock.format"/>
46+
/// <seealso cref="InputStateBlock.format"/>
4747
public static FourCC Format => new FourCC('K', 'E', 'Y', 'S');
4848

4949
private const int kSizeInBits = Keyboard.KeyCount;

0 commit comments

Comments
 (0)