My code is:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class InputManager : MonoBehaviour
{
private PlayerInput playerInput;
private playerInput.OnFootActions onFoot;
private PlayerMotor motor;
void Awake()
{
playerInput = new.PlayerInput();
onFoot = playerInput.OnFoot();
motor = GetComponenet<PlayerMotor>();
}
void FixedUpdate()
{
//tell playermotor to move using value form the movement action.
motor.ProcessMove(onFoot.Movement.ReadValue<Vector2>());
}
private void OnEnable()
{
onFoot.Enable();
}
private void OnDisable()
{
onFoot.Disable();
}
}
And I don’t know why nothing is working.