getting input string from the InputSystem unity code example
Example 1: unity how to get input
using UnityEngine;
using System.Collections;public class ExampleClass : MonoBehaviour
{
public void Update()
{
if (Input.GetButtonDown("Fire1"))
{
Debug.Log(Input.mousePosition);
}
}
}
Example 2: how to stop clear input new input system unity
_controls.Player.Move.started += ctx => movementInput = ctx.ReadValue<Vector2>()
_controls.Player.Move.performed += ctx => movementInput = ctx.ReadValue<Vector2>()
_controls.Player.Move.canceled += ctx => movementInput = ctx.ReadValue<Vector2>()