using UnityEngine; using UnityEngine.InputSystem; public class PlayerCtrl : MonoBehaviour { InputAction inputAction; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { inputAction = FindAnyObjectByType().actions["Move"]; inputAction.performed += (ctx) => { Vector2 value = ctx.ReadValue(); Debug.Log(value); }; } // Update is called once per frame void Update() { } }