Skip to content

Commit e2d5fd2

Browse files
committed
fixes for docs
1 parent 99ca583 commit e2d5fd2

File tree

2 files changed

+31
-41
lines changed

2 files changed

+31
-41
lines changed

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

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ namespace UnityEngine.InputSystem
7777
/// which has APIs specific to the type of value of the control (e.g. <see cref="InputControl{TValue}.ReadValue()"/>.
7878
///
7979
/// The following example demonstrates various common operations performed on input controls:
80-
///
80+
/// </remarks>
8181
/// <example>
8282
/// <code>
8383
/// // Look up dpad/up control on current gamepad.
@@ -99,10 +99,7 @@ namespace UnityEngine.InputSystem
9999
/// leftStickHistory.Enable();
100100
/// </code>
101101
/// </example>
102-
/// <example>
103-
/// </example>
104-
/// </remarks>
105-
/// <see cref="InputControl{TValue}"/>
102+
/// <seealso cref="InputControl{TValue}"/>
106103
/// <seealso cref="InputDevice"/>
107104
/// <seealso cref="InputControlPath"/>
108105
/// <seealso cref="InputStateBlock"/>
@@ -611,6 +608,8 @@ public virtual unsafe void WriteValueFromObjectIntoState(object value, void* sta
611608
/// Note that if the given path matches multiple child controls, only the first control
612609
/// encountered in the search will be returned.
613610
///
611+
/// This method is equivalent to calling <see cref="InputControlPath.TryFindChild"/>.
612+
/// </remarks>
614613
/// <example>
615614
/// <code>
616615
/// // Returns the leftStick control of the current gamepad.
@@ -625,9 +624,6 @@ public virtual unsafe void WriteValueFromObjectIntoState(object value, void* sta
625624
/// Gamepad.current.TryGetChildControl("*stick");
626625
/// </code>
627626
/// </example>
628-
///
629-
/// This method is equivalent to calling <see cref="InputControlPath.TryFindChild"/>.
630-
/// </remarks>
631627
public InputControl TryGetChildControl(string path)
632628
{
633629
if (string.IsNullOrEmpty(path))
@@ -689,7 +685,7 @@ protected InputControl()
689685
/// <remarks>
690686
/// This method can be overridden to perform control- or device-specific setup work. The most
691687
/// common use case is for looking up child controls and storing them in local getters.
692-
///
688+
/// </remarks>
693689
/// <example>
694690
/// <code>
695691
/// public class MyDevice : InputDevice
@@ -706,7 +702,6 @@ protected InputControl()
706702
/// }
707703
/// </code>
708704
/// </example>
709-
/// </remarks>
710705
protected virtual void FinishSetup()
711706
{
712707
}
@@ -723,7 +718,7 @@ protected virtual void FinishSetup()
723718
///
724719
/// This method should be called if you are accessing cached data set up by
725720
/// <see cref="RefreshConfiguration"/>.
726-
///
721+
/// </remarks>
727722
/// <example>
728723
/// <code>
729724
/// using UnityEngine.InputSystem;
@@ -782,7 +777,6 @@ protected virtual void FinishSetup()
782777
/// }
783778
/// </code>
784779
/// </example>
785-
/// </remarks>
786780
/// <seealso cref="RefreshConfiguration"/>
787781
protected void RefreshConfigurationIfNeeded()
788782
{
@@ -798,7 +792,7 @@ protected void RefreshConfigurationIfNeeded()
798792
/// </summary>
799793
/// <remarks>
800794
/// The system will call this method automatically whenever change is made to one of the control's configuration properties.
801-
/// See <seealso cref="RefreshConfigurationIfNeeded"/>.
795+
/// See <see cref="RefreshConfigurationIfNeeded"/>.
802796
/// </remarks>
803797
/// <example>
804798
/// <code>
@@ -960,8 +954,6 @@ protected virtual FourCC CalculateOptimizedControlDataType()
960954
/// <summary>
961955
/// Apply built-in parameters changes (e.g. <see cref="AxisControl.invert"/>, others), recompute <see cref="InputControl.optimizedControlDataType"/> for impacted controls and clear cached value.
962956
/// </summary>
963-
/// <remarks>
964-
/// </remarks>
965957
public void ApplyParameterChanges()
966958
{
967959
// First we go through all children of our own hierarchy

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

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,27 @@ namespace UnityEngine.InputSystem
4141
/// runtime. However, it is possible to manually add devices using methods such as <see
4242
/// cref="InputSystem.AddDevice{TDevice}(string)"/>.
4343
///
44-
/// <example>
45-
/// <code>
46-
/// // Add a "synthetic" gamepad that isn't actually backed by hardware.
47-
/// var gamepad = InputSystem.AddDevice&lt;Gamepad&gt;();
48-
/// </code>
49-
/// </example>
50-
///
5144
/// There are subclasses representing the most common types of devices, like <see cref="Mouse"/>,
5245
/// <see cref="Keyboard"/>, <see cref="Gamepad"/>, and <see cref="Touchscreen"/>.
5346
///
5447
/// To create your own types of devices, you can derive from InputDevice and register your device
5548
/// as a new "layout".
5649
///
50+
/// Devices can have usages like any other control (<see cref="InputControl.usages"/>). Unlike other controls,
51+
/// however, usages of InputDevices are allowed to be changed on the fly without requiring a change to the
52+
/// device layout (see <see cref="InputSystem.SetDeviceUsage(InputDevice,string)"/>).
53+
///
54+
/// For a more complete example of how to implement custom input devices, check out the "Custom Device"
55+
/// sample which you can install from the Unity package manager.
56+
///
57+
/// And, as always, you can also find more information in the <a href="../manual/Devices.html">manual</a>.
58+
/// </remarks>
59+
/// <example>
60+
/// <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>
5765
/// <example>
5866
/// <code>
5967
/// // InputControlLayoutAttribute attribute is only necessary if you want
@@ -131,16 +139,6 @@ namespace UnityEngine.InputSystem
131139
/// }
132140
/// </code>
133141
/// </example>
134-
///
135-
/// Devices can have usages like any other control (<see cref="InputControl.usages"/>). Unlike other controls,
136-
/// however, usages of InputDevices are allowed to be changed on the fly without requiring a change to the
137-
/// device layout (see <see cref="InputSystem.SetDeviceUsage(InputDevice,string)"/>).
138-
///
139-
/// For a more complete example of how to implement custom input devices, check out the "Custom Device"
140-
/// sample which you can install from the Unity package manager.
141-
///
142-
/// And, as always, you can also find more information in the <a href="../manual/Devices.html">manual</a>.
143-
/// </remarks>
144142
/// <seealso cref="InputControl"/>
145143
/// <seealso cref="Mouse"/>
146144
/// <seealso cref="Keyboard"/>
@@ -508,9 +506,9 @@ public virtual void MakeCurrent()
508506
/// </summary>
509507
/// <remarks>
510508
/// This is called <em>after</em> the device has already been added.
511-
/// <seealso cref="InputSystem.devices"/>
512-
/// <seealso cref="InputDeviceChange.Added"/>
513-
/// <seealso cref="OnRemoved"/>
509+
/// <see cref="InputSystem.devices"/>
510+
/// <see cref="InputDeviceChange.Added"/>
511+
/// <see cref="OnRemoved"/>
514512
/// </remarks>
515513
/// <example>
516514
/// <code>
@@ -537,9 +535,9 @@ protected virtual void OnAdded()
537535
/// </summary>
538536
/// <remarks>
539537
/// This is called <em>after</em> the device has already been removed.
540-
/// <seealso cref="InputSystem.devices"/>
541-
/// <seealso cref="InputDeviceChange.Removed"/>
542-
/// <seealso cref="OnAdded"/>
538+
/// <see cref="InputSystem.devices"/>
539+
/// <see cref="InputDeviceChange.Removed"/>
540+
/// <see cref="OnAdded"/>
543541
/// </remarks>
544542
/// <example>
545543
/// <code>
@@ -575,7 +573,7 @@ protected virtual void OnRemoved()
575573
/// </remarks>
576574
/// <seealso cref="InputManager.OnUpdate"/>
577575
/// <seealso cref="InputDeviceChange.ConfigurationChanged"/>
578-
/// <seealso cref="OnConfigurationChanged"/>///
576+
/// <seealso cref="OnConfigurationChanged"/>
579577
protected virtual void OnConfigurationChanged()
580578
{
581579
}
@@ -593,8 +591,8 @@ protected virtual void OnConfigurationChanged()
593591
/// the device API. This is most useful for devices implemented in the native Unity runtime
594592
/// which, through the command interface, may provide custom, device-specific functions.
595593
///
596-
/// This is a low-level API. It works in a similar way to <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa363216%28v=vs.85%29.aspx?f=255&amp;MSPPError=-2147217396" target="_blank">
597-
/// DeviceIoControl</a> on Windows and <a href="https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/ioctl.2.html#//apple_ref/doc/man/2/ioctl" target="_blank">ioctl</a>
594+
/// This is a low-level API. It works in a similar way to <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa363216%28v=vs.85%29.aspx?f=255&amp;MSPPError=-2147217396">
595+
/// DeviceIoControl</a> on Windows and <a href="https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/ioctl.2.html#//apple_ref/doc/man/2/ioctl">ioctl</a>
598596
/// on UNIX-like systems.
599597
/// </remarks>
600598
public unsafe long ExecuteCommand<TCommand>(ref TCommand command)

0 commit comments

Comments
 (0)