Search Unity

Resolved InputSystem stopped working and registers no input of any kind now

Discussion in 'Input System' started by asciifaceman, Dec 20, 2020.

  1. asciifaceman

    asciifaceman

    Joined:
    Jun 7, 2018
    Posts:
    2
    macOS 10.14.6 Mojave
    Unity: 2020.1.17f1
    InputSystem: 1.0.1



    Very basic InputSystem WASD + Mouse

    It had been working for the last week as I developed my CharacterController, then today it stopped working without error or notice.

    It's a very basic setup

    Screen Shot 2020-12-19 at 4.33.30 PM.png

    Very simple implementation:


    Code (CSharp):
    1.  
    2. private PlayerControls pcon;
    3. ...
    4. private void Awake()
    5. {
    6.     pcon = new PlayerControls();
    7. }
    8. ...
    9. private void Update()
    10. {
    11.     var lookInput = pcon.Gameplay.Camera.ReadValue<Vector2>();
    12.     Debug.Log(lookInput); // This always returns 0,0,0 now
    13. }
    14.  
    Other keys never trigger a started/performed event etc. I've tried deleting the generated class and recreating it, there is no change.

    Input Debug shows the Mouse and Keyboard are present and supported. Focus isn't an issue, and I've stepped through about a dozen somewhat adjacently related issues across the forums. It was configured and working as recently as an hour ago then just died.

    I really have no idea what is going on. Restarting hasn't helped.
     
  2. asciifaceman

    asciifaceman

    Joined:
    Jun 7, 2018
    Posts:
    2
    I accidentally stumbled across my cause. During my refactors/rewrites I somehow left this little handy bit behind. I hope this may help someone who stumbles across this in their searches. Don't forget to enable your controls like this idiot


    Code (CSharp):
    1.     private void OnEnable()
    2.     {
    3.         playerControlsVariable.Enable();
    4.     }
    5.