Search Unity

Question New Input System simply stops working

Discussion in 'Input System' started by jeremy1967, Aug 17, 2021.

  1. jeremy1967

    jeremy1967

    Joined:
    Jun 4, 2019
    Posts:
    68
    So I originally had my input working using the new system when for no obvious reason, it has just stopped working. The input debugger indicates all devices present and their corresponding events are being detected, yet no messages are being set that I can tell. I am nearly certain I did not change any settings since it last worked and all subsequent attempts at fixing have failed. I am at a loss at this point and was hoping someone may have had a similar experience and no of a solution. Restarting Unity/PC has no effect.

    I have my input action maps configured and properly referenced by a single PlayerInput component assigned to my player object.

    Thanks

    Unity Version: 2020.3.12f1
    Input System: 1.1.0-preview.3
     
    Last edited: Aug 17, 2021
  2. wardler

    wardler

    Joined:
    Jan 25, 2021
    Posts:
    22
    Make sure that your input system is enabled:

    upload_2021-8-17_11-23-17.png
     
    vladstori98 likes this.
  3. jeremy1967

    jeremy1967

    Joined:
    Jun 4, 2019
    Posts:
    68
    What class is _inputMaster? I didn't have anything like that previously though things were working without it.

    Thanks
     
  4. wardler

    wardler

    Joined:
    Jan 25, 2021
    Posts:
    22
    InputMaster is the class as seen in this code:

    upload_2021-8-17_12-45-31.png
     
  5. jeremy1967

    jeremy1967

    Joined:
    Jun 4, 2019
    Posts:
    68
    Hmm. Unfortunately I cannot find that class. Is this part of package I have to import other than 'Input System'?
     
  6. wardler

    wardler

    Joined:
    Jan 25, 2021
    Posts:
    22
    Look at your Controls in the inspector and it should show the associated class:
    (The controls object being whatever you're clicking on to set your binds)

    upload_2021-8-17_13-51-53.png
     
  7. wardler

    wardler

    Joined:
    Jan 25, 2021
    Posts:
    22
    Just to clarify, the class name is going to be whatever you name it. I had forgotten that I had named mine InputMaster. Yours may have a different name. Follow the steps in my last post to find the name of your Input/Controls class.
     
  8. jeremy1967

    jeremy1967

    Joined:
    Jun 4, 2019
    Posts:
    68
    Thanks for the detailed reply. Greatly appreciated. I was unfamiliar with the 'Generate C# Class' option and have not used that before. Like I said, things were working then just stopped so I was only looking at the things I had touched prior to that. I will need to do some reading up on this generated class and it's usage as just a quick try generating one did not seem to do anything (it appears to be enabled), but I will spend some time with it and try to make sense of it. Thanks again.
     
  9. wardler

    wardler

    Joined:
    Jan 25, 2021
    Posts:
    22
    You'll want to generate it, then instantiate it inside the script, and then enable the instantiated object as seen in the pictures I posted earlier in this thread.

    This video may help:
     
  10. jeremy1967

    jeremy1967

    Joined:
    Jun 4, 2019
    Posts:
    68
    Thanks, but still no luck. I even started a brand new project to test out the steps as outlined in the video you provided. Aside from some minor differences due to different Unity versions, I pretty much followed the steps exactly. I'm at a loss on this one.
     
  11. AwsomeExperiment103

    AwsomeExperiment103

    Joined:
    Sep 11, 2022
    Posts:
    2
    Same thing happened to me, and I don't know why. I am using visual coding, also known as bolt. It was working but then, I saved the project and closed unity. When I went back later, it just stopped working. Everything was the same; it just stopped.