Skip to content

Commit 3cfee0a

Browse files
committed
Fixed examples structure
1 parent b875e48 commit 3cfee0a

File tree

1 file changed

+5
-7
lines changed
  • Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput

1 file changed

+5
-7
lines changed

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/InputValue.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public object Get()
4848
/// does not match the value type expected by the control or binding composite.</exception>
4949
/// <remarks>
5050
/// The following example shows how to read a value from a <see cref="PlayerInput"/> message.
51-
///
51+
/// The given <c>InputValue</c> is only valid for the duration of the callback. Storing the <c>InputValue</c> references somewhere and calling Get&lt;T&gt;() later does not work correctly.
52+
/// </remarks>
5253
/// <example>
5354
/// <code>
5455
/// using UnityEngine;
@@ -72,8 +73,6 @@ public object Get()
7273
/// }
7374
/// </code>
7475
/// </example>
75-
/// The given <c>InputValue</c> is only valid for the duration of the callback. Storing the <c>InputValue</c> references somewhere and calling Get&lt;T&gt;() later does not work correctly.
76-
/// </remarks>
7776
/// <seealso cref="InputAction.CallbackContext.ReadValue{TValue}"/>
7877
public TValue Get<TValue>()
7978
where TValue : struct
@@ -88,10 +87,11 @@ public TValue Get<TValue>()
8887
/// <summary>
8988
/// Check if the action button is pressed.
9089
/// </summary>
91-
/// <returns>True if the button is activated over the button threshold. False otherwise</returns>
9290
/// <remarks>
91+
/// True if the button is activated over the button threshold. False otherwise
9392
/// The following example check if a button is pressed when receiving a <see cref="PlayerInput"/> message.
94-
///
93+
/// The given <c>InputValue</c> is only valid for the duration of the callback. Storing the <c>InputValue</c> references somewhere and calling Get&lt;T&gt;() later does not work correctly.
94+
/// </remarks>
9595
/// <example>
9696
/// <code>
9797
/// [RequireComponent(typeof(PlayerInput))]
@@ -111,8 +111,6 @@ public TValue Get<TValue>()
111111
/// }
112112
/// </code>
113113
/// </example>
114-
/// The given <c>InputValue</c> is only valid for the duration of the callback. Storing the <c>InputValue</c> references somewhere and calling Get&lt;T&gt;() later does not work correctly.
115-
/// </remarks>
116114
/// <seealso cref="ButtonControl.pressPointOrDefault"/>
117115
public bool isPressed => Get<float>() >= ButtonControl.s_GlobalDefaultButtonPressPoint;
118116

0 commit comments

Comments
 (0)