title: Unity2D - Player not moving no matter what I try
body: <p>I've been trying to get the new input system for Unity2D working, but I've been struggling; despite looking through multiple tutorials, even if I manage to get rid of all errors, I simply don't move.</p>
  <p>Now, whenever I run the scene, I get flooded with this error over and over again:</p>
  <p><code>NullReferenceException: Object reference not set to an instance of an object PlayerM.Update () (at Assets/PlayerM.cs:27)</code></p>
  <p>Here's my player movement script:</p>
  <pre><code>using System.Collections.Generic;
  using UnityEngine;
  using UnityEngine.InputSystem;
  
  public class PlayerM : MonoBehaviour
  {
  
      Rigidbody2D rb;
      Vector2 pos;
      public float speed = 2f;
  
      void Start()
      {
  
      }
  
      void OnMove(InputValue value)
      {
          pos = value.Get&lt;Vector2&gt;();
          Debug.Log(&quot;Moving!&quot;);
      }
  
      // Update is called once per frame
      void Update()
      {
          rb.MovePosition(rb.position + pos * speed * Time.deltaTime);
      }    
  }
  </code></pre>
  <p>And here's my input action asset:</p>
  <p><a href="https://i.stack.imgur.com/Y9sPM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y9sPM.png" alt="I've attempted switching between 2D and 1D axis to no avail." /></a></p>