Skip to content

Commit 82d6127

Browse files
Fix duplicated comment for documentation and used a cref on IsPressed instead.
1 parent a73b5f5 commit 82d6127

1 file changed

Lines changed: 6 additions & 36 deletions

File tree

  • Packages/com.unity.inputsystem/InputSystem/Runtime/Actions

Packages/com.unity.inputsystem/InputSystem/Runtime/Actions/InputAction.cs

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,8 @@ public void Reset()
11541154
/// to a <see cref="StickControl"/>, the control will be considered "pressed" once the magnitude
11551155
/// of the Vector2 of the control has crossed the press threshold.
11561156
///
1157+
/// The same press threshold rules apply to APIs such as <see cref="WasPressedThisFrame"/> and <see cref="WasReleasedThisFrame"/>.
1158+
///
11571159
/// Press threshold (based on <see cref="InputControl.EvaluateMagnitude()"/> for the driving control):
11581160
///
11591161
/// 1. If the binding lists one or more <see cref="UnityEngine.InputSystem.Interactions.PressInteraction"/>
@@ -1166,10 +1168,6 @@ public void Reset()
11661168
///
11671169
/// For composite bindings, interaction parameters are read from the composite binding.
11681170
///
1169-
/// for a <see cref="ButtonControl"/> it uses <see cref="ButtonControl.pressPointOrDefault"/>, and for other controls
1170-
/// with actuation magnitude (including <see cref="Vector2Control"/> and <see cref="StickControl"/>) it uses
1171-
/// <see cref="InputSettings.defaultButtonPressPoint"/>.
1172-
///
11731171
/// <example>
11741172
/// <code>
11751173
/// var up = playerInput.actions["up"];
@@ -1242,21 +1240,7 @@ private int ExpectedFrame()
12421240
/// to a <see cref="StickControl"/>, the control will be considered "pressed" once the magnitude
12431241
/// of the Vector2 of the control has crossed the press threshold.
12441242
///
1245-
/// Press threshold (based on <see cref="InputControl.EvaluateMagnitude()"/> for the driving control):
1246-
///
1247-
/// 1. If the binding lists one or more <see cref="UnityEngine.InputSystem.Interactions.PressInteraction"/>
1248-
/// instances, use the <see cref="UnityEngine.InputSystem.Interactions.PressInteraction.pressPoint"/> from the first
1249-
/// in interaction list order whose <c>pressPoint</c> is greater than zero (earlier interactions that are not
1250-
/// <see cref="UnityEngine.InputSystem.Interactions.PressInteraction"/>, or that leave <c>pressPoint</c> at the
1251-
/// default of zero, are skipped) so this API stays aligned with the interaction.
1252-
/// 2. Otherwise, if the driving control is a <see cref="ButtonControl"/>, use <see cref="ButtonControl.pressPointOrDefault"/>.
1253-
/// 3. Otherwise (for example a <see cref="Vector2Control"/> or <see cref="StickControl"/>), use <see cref="InputSettings.defaultButtonPressPoint"/>.
1254-
///
1255-
/// For composite bindings, interaction parameters are read from the composite binding.
1256-
///
1257-
/// for a <see cref="ButtonControl"/> it uses <see cref="ButtonControl.pressPointOrDefault"/>, and for other controls
1258-
/// with actuation magnitude (including <see cref="Vector2Control"/> and <see cref="StickControl"/>) it uses
1259-
/// <see cref="InputSettings.defaultButtonPressPoint"/>.
1243+
/// Press threshold is defined the same way as for <see cref="IsPressed"/>; see that member's remarks.
12601244
///
12611245
/// <example>
12621246
/// <code>
@@ -1308,7 +1292,7 @@ public unsafe bool WasPressedThisFrame()
13081292
/// When processing input events manually, updating the InputSystem in the dynamic Update cycle will lead to a delay of one frame for WasPressedThisDynamicUpdate,
13091293
/// you may want to use WasPressedThisFrame to avoid this, or set the input update mode to InputSettings.UpdateMode.ProcessEventsInDynamicUpdate.
13101294
///
1311-
/// Press threshold behavior matches <see cref="WasPressedThisFrame"/>; see its remarks.
1295+
/// Press threshold behavior matches <see cref="IsPressed"/>; see that member's remarks.
13121296
/// </remarks>
13131297
/// <example>
13141298
/// <code>
@@ -1340,7 +1324,7 @@ public unsafe bool WasPressedThisDynamicUpdate()
13401324

13411325
/// <summary>
13421326
/// Returns true if the action's value crossed the release threshold (see <see cref="InputSettings.buttonReleaseThreshold"/>)
1343-
/// at any point in the frame after being in pressed state (see remarks for press threshold).
1327+
/// at any point in the frame after being in pressed state (see <see cref="IsPressed"/> remarks for press threshold).
13441328
/// </summary>
13451329
/// <returns>True if the action was released this frame.</returns>
13461330
/// <remarks>
@@ -1351,21 +1335,7 @@ public unsafe bool WasPressedThisDynamicUpdate()
13511335
/// to a <see cref="StickControl"/>, the control will be considered "pressed" once the magnitude
13521336
/// of the Vector2 of the control has crossed the press threshold.
13531337
///
1354-
/// Press threshold (based on <see cref="InputControl.EvaluateMagnitude()"/> for the driving control):
1355-
///
1356-
/// 1. If the binding lists one or more <see cref="UnityEngine.InputSystem.Interactions.PressInteraction"/>
1357-
/// instances, use the <see cref="UnityEngine.InputSystem.Interactions.PressInteraction.pressPoint"/> from the first
1358-
/// in interaction list order whose <c>pressPoint</c> is greater than zero (earlier interactions that are not
1359-
/// <see cref="UnityEngine.InputSystem.Interactions.PressInteraction"/>, or that leave <c>pressPoint</c> at the
1360-
/// default of zero, are skipped) so this API stays aligned with the interaction.
1361-
/// 2. Otherwise, if the driving control is a <see cref="ButtonControl"/>, use <see cref="ButtonControl.pressPointOrDefault"/>.
1362-
/// 3. Otherwise (for example a <see cref="Vector2Control"/> or <see cref="StickControl"/>), use <see cref="InputSettings.defaultButtonPressPoint"/>.
1363-
///
1364-
/// For composite bindings, interaction parameters are read from the composite binding.
1365-
///
1366-
/// for a <see cref="ButtonControl"/> it uses <see cref="ButtonControl.pressPointOrDefault"/>, and for other controls
1367-
/// with actuation magnitude (including <see cref="Vector2Control"/> and <see cref="StickControl"/>) it uses
1368-
/// <see cref="InputSettings.defaultButtonPressPoint"/>.
1338+
/// Press threshold is defined the same way as for <see cref="IsPressed"/>; see that member's remarks.
13691339
///
13701340
/// <example>
13711341
/// <code>

0 commit comments

Comments
 (0)