You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The type depends on what type of controls the action is bound to.
46
+
/// Common types are <c>float</c> and <see cref="UnityEngine.Vector2"/></typeparam>
47
+
/// <exception cref="InvalidOperationException">The given type <typeparamref name="TValue"/>
48
+
/// does not match the value type expected by the control or binding composite.</exception>
49
+
/// <remarks>
50
+
/// The following example shows how to read a value from a <see cref="PlayerInput"/> message.
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<T>() later does not work correctly.
52
+
/// </remarks>
53
+
/// <example>
54
+
/// <code>
55
+
/// using UnityEngine;
56
+
/// using UnityEngine.InputSystem;
57
+
/// [RequireComponent(typeof(PlayerInput))]
58
+
/// public class MyPlayerLogic : MonoBehaviour
59
+
/// {
60
+
/// private Vector2 m_Move;
61
+
///
62
+
/// // 'Move' input action has been triggered.
63
+
/// public void OnMove(InputValue value)
64
+
/// {
65
+
/// // Read value from control. The type depends on what type of controls the action is bound to.
////TODO: proper message if value type isn't right
87
+
/// <summary>
88
+
/// Check if the action button is pressed.
89
+
/// </summary>
90
+
/// <remarks>
91
+
/// True if the button is activated over the button threshold. False otherwise
92
+
/// The following example check if a button is pressed when receiving a <see cref="PlayerInput"/> message.
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<T>() later does not work correctly.
0 commit comments