Skip to content

Commit b2af848

Browse files
committed
Documentation feedback for InputControl
1 parent 361fcae commit b2af848

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public string displayName
171171
/// For nested controls, the short display name will include the short display names of all parent controls,
172172
/// that is, the display name will fully identify the control on the device. For example, the display
173173
/// name for the left D-Pad button on a gamepad is "D-Pad \u2190" and not just "\u2190". Note that if a parent
174-
/// control has no short name, its long name will be used instead. See <see cref="displayName"/>
174+
/// control has no short name, its long name will be used instead. See <see cref="displayName"/>.
175175
/// </remarks>
176176
public string shortDisplayName
177177
{
@@ -237,7 +237,7 @@ public string path
237237
/// </summary>
238238
/// <remarks>
239239
/// This is the root of the control hierarchy. For the device at the root, this
240-
/// will point to itself. (See <see cref="InputDevice.allControls"/>)
240+
/// will point to itself (See <see cref="InputDevice.allControls"/>).
241241
/// </remarks>
242242
public InputDevice device => m_Device;
243243

@@ -246,7 +246,8 @@ public string path
246246
/// </summary>
247247
/// <value>
248248
/// The immediate parent of the control or null if the control has no parent
249-
/// (which, once fully constructed, will only be the case for InputDevices). <see cref="children"/>
249+
/// (which, once fully constructed, will only be the case for InputDevices).
250+
/// See the related <see cref="children"/> field.
250251
/// </value>
251252
public InputControl parent => m_Parent;
252253

@@ -255,7 +256,7 @@ public string path
255256
/// </summary>
256257
/// <remarks>
257258
/// Does not allocate.
258-
/// <see cref="parent"/>
259+
/// See the related <see cref="parent"/> field.
259260
/// </remarks>
260261
public ReadOnlyArray<InputControl> children =>
261262
new ReadOnlyArray<InputControl>(m_Device.m_ChildrenForEachControl, m_ChildStartIndex, m_ChildCount);
@@ -299,7 +300,8 @@ public string path
299300
/// List of alternate names for the control.
300301
/// </summary>
301302
/// <value>
302-
/// List of aliased alternate names for the control. And example alias would be North for the Triangle button on a Playstation pad (or 'Y' button on Xbox pad).
303+
/// List of aliased alternate names for the control.
304+
/// An example of an alias would be '<c>North</c>' for the '<c>Triangle</c>' button on a Playstation pad (or '<c>Y</c>' button on Xbox pad).
303305
/// </value>
304306
public ReadOnlyArray<InternedString> aliases =>
305307
new ReadOnlyArray<InternedString>(m_Device.m_AliasesForEachControl, m_AliasStartIndex, m_AliasCount);
@@ -382,7 +384,7 @@ internal set
382384
/// represents input from a made-up control. If, however, the "left" button is the only
383385
/// viable pick, it will be accepted.
384386
///
385-
/// A control layout will specific if it is synthetic using <see cref="InputControlLayout.ControlItem.isSynthetic"/>.
387+
/// A control layout will specify if it is synthetic using <see cref="InputControlLayout.ControlItem.isSynthetic"/>.
386388
/// See <see cref="InputControlAttribute.synthetic"/>.
387389
/// </remarks>
388390
public bool synthetic
@@ -531,7 +533,7 @@ public virtual unsafe float EvaluateMagnitude(void* statePtr)
531533
/// Read the control's final, processed value from the given buffer and return the value as an object.
532534
/// </summary>
533535
/// <param name="buffer">Buffer to read the value from.</param>
534-
/// <param name="bufferSize">Size of <paramref name="buffer"/> in bytes. which must be large enough to store the value.</param>
536+
/// <param name="bufferSize">Size of <paramref name="buffer"/> in bytes, which must be large enough to store the value.</param>
535537
/// <returns>The control's value as stored in <paramref name="buffer"/>.</returns>
536538
/// <remarks>
537539
/// Read the control's final, processed value from the given buffer and return the value as an object.
@@ -865,7 +867,7 @@ protected void RefreshConfigurationIfNeeded()
865867
}
866868

867869
/// <summary>
868-
/// Refresh Configuration
870+
/// Refreshes the controls configuration.
869871
/// </summary>
870872
/// <remarks>
871873
/// This method is only relevant if you are implementing your own devices or new
@@ -978,7 +980,7 @@ protected internal uint stateOffsetRelativeToDeviceRoot
978980
internal FourCC m_OptimizedControlDataType;
979981

980982
/// <summary>
981-
/// The type of the state memory associated with the control
983+
/// The type of the state memory associated with the control.
982984
/// </summary>
983985
/// <remarks>
984986
/// For some types of control you can safely read/write state memory directly
@@ -1001,7 +1003,6 @@ protected internal uint stateOffsetRelativeToDeviceRoot
10011003
/// Calculates and returns an optimized data type that can represent a control's value in memory directly.
10021004
/// </summary>
10031005
/// <remarks>
1004-
/// Calculates and returns an optimized data type that can represent a control's value in memory directly.
10051006
/// The value then is cached in <see cref="InputControl.optimizedControlDataType"/>.
10061007
/// This method is for internal use only, you should not call this from your own code.
10071008
/// </remarks>
@@ -1455,7 +1456,7 @@ public TValue ReadDefaultValue()
14551456
/// <summary>
14561457
/// Get the control's default value.
14571458
/// </summary>
1458-
/// <param name="statePtr">State containing the control's <see cref="stateBlock"/>.</param>
1459+
/// <param name="statePtr">State containing the control's <see cref="InputControl.stateBlock"/>.</param>
14591460
/// <returns>The control's default value.</returns>
14601461
/// <remarks>
14611462
/// This is not necessarily equivalent to <c>default(TValue)</c>. A control's default value is determined

0 commit comments

Comments
 (0)