title: How to access the click (desktop) / tap (mobile) position using the new input system?
body: <p>I created a new Unity project and installed the package for the new Input system. Basically I just want to store the position of a click (desktop) / tap (mobile), that's it.</p>
  <p>I know the old system provides solutions</p>
  <ul>
  <li><a href="https://docs.unity3d.com/ScriptReference/Input-mousePosition.html" rel="noreferrer">https://docs.unity3d.com/ScriptReference/Input-mousePosition.html</a></li>
  <li><a href="https://docs.unity3d.com/ScriptReference/Touch-position.html" rel="noreferrer">https://docs.unity3d.com/ScriptReference/Touch-position.html</a></li>
  </ul>
  <p>but I want to solve it with the new input system.</p>
  <p>I started with this input map configuration (I will show the configuration for each selected item)</p>
  <p><a href="https://i.stack.imgur.com/O62dt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/O62dt.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/aqKzt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aqKzt.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/qnxBy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qnxBy.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/WlXoV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WlXoV.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/qoPma.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qoPma.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/ikLuX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ikLuX.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/Nds8N.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Nds8N.png" alt="enter image description here" /></a></p>
  <p>I created a new script logging each click/tap position</p>
  <pre><code>public class FooBar : MonoBehaviour
  {
      public void Select(InputAction.CallbackContext context)
      {
          Vector2 selectPosition = context.ReadValue&lt;Vector2&gt;();
          Debug.Log($&quot;Select position is: {selectPosition.x}|{selectPosition.y}&quot;);
      }
  }
  </code></pre>
  <p>In the scene I created an empty gameobject and configured it in the inspector</p>
  <p><a href="https://i.stack.imgur.com/JtQSH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JtQSH.png" alt="enter image description here" /></a></p>
  <p>Unfortunately when running the playmode I get these errors each time when moving the mouse around</p>
  <p><a href="https://i.stack.imgur.com/cmnPp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/cmnPp.png" alt="enter image description here" /></a></p>
  <p>This is the stacktrace of the first error message</p>
  <p><a href="https://i.stack.imgur.com/MK5Qx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MK5Qx.png" alt="enter image description here" /></a></p>
  <p>and this is the stacktrace of the second error message</p>
  <p><a href="https://i.stack.imgur.com/g9j7r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/g9j7r.png" alt="enter image description here" /></a></p>
  <p>So I'm assuming my input map configuration is wrong.</p>
  <p>Would someone mind helping me setting up an input configuration passing the click/tap position to the script?</p>
  <hr />
  <p>So for a quick workaround I currently use this code with the old input system but I really don't like it ;)</p>
  <pre><code>    public sealed class SelectedPositionStateController : MonoBehaviour
      {
          private void Update()
          {
  #if UNITY_ANDROID || UNITY_IOS
              if (UnityEngine.Input.touchCount &gt; 0)
              {
                  Touch touch = UnityEngine.Input.GetTouch(0);
                  
                  // do things with touch.position
              }
  #elif UNITY_STANDALONE
              if (UnityEngine.Input.GetMouseButtonDown(0))
              {
                  // do things with Input.mousePosition
              }
  #endif
          }
          
          // !!! USE THIS CODE BECAUSE IT'S OBVIOUSLY BETTER !!!
          // 
          // public void SelectPosition(InputAction.CallbackContext context)
          // {
          //     Vector2 selectedPosition = context.ReadValue&lt;Vector2&gt;();
          //     
          //     // do things with selectedPosition
          // }
      }
  </code></pre>