using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; public class PlayerMovement : MonoBehaviour { private InputMaster _inputMaster; [SerializeField] private CharacterController controller; [SerializeField] private float speed; private Vector2 _moveDirection; private void Awake() { controller = GetComponent(); _inputMaster = new InputMaster(); _inputMaster.Player.Move.Enable(); } public void OnMove(InputAction.CallbackContext context) { _moveDirection = context.ReadValue(); Debug.Log("direction: " + _moveDirection); } }