public class PlayeMoving : MonoBehaviour
{
public Vector2 direction;
public Rigidbody2D rb2D;
public void Moving(InputAction.CallbackContext context)
{
direction = context.ReadValue<Vector2>();
rb2D.MovePosition(direction);
}
}