Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

No Continuous option, can't hold button

Discussion in 'Input System' started by grimofdoom, Sep 5, 2020.

  1. grimofdoom

    grimofdoom

    Joined:
    Sep 6, 2013
    Posts:
    168
    First off, yes I know that 'hold' for interaction type is "hold for x time, then goes off".

    I am using the new Input System for really the first time. I was able to setup the control action map and actions (kind of), and PlayerInput to connected off each Action as made in the input actions (and working). But what I cannot do is make a button continuously fire off when held down. I look in the properties, as everyone suggests, and there is absolutely zero checkbox, dropdown continuous, that is even called "Continuous". I was on the verified 1.0.0 version, but I am no on 1.1.0 in case there was something new, like that option was somehow omitted and brought back.
     
  2. grimofdoom

    grimofdoom

    Joined:
    Sep 6, 2013
    Posts:
    168
    Update:
    I am now not getting any input recognized. I followed a tutorial that took a very deep google search to find and came up with this stuff. No processors or interactions added, and adding any 3 of the press trigger behaviors did nothing. I added PlayerInput and set it up, but that had no effect. Computer has had a full shutdown, to no avail. I am at a complete loss. The GUI for the new Input System is so fantastic, but nothing is working for me so far...

    is1.PNG is2.PNG is3.PNG

    Some help would be really appreciated. I honestly do not want to go back to touching Input Manager.

    edit: Both Keyboard and Gamepad are set up as '2D Vector' and 'Digital Normalized'

    edt 2: I figured out how to use the input debugger properly. While game is playing in editor, the logger shows keyboard buttons are being pressed- but Input System is just not accepting that and not triggering ANY events.
     
    Last edited: Sep 6, 2020
  3. grimofdoom

    grimofdoom

    Joined:
    Sep 6, 2013
    Posts:
    168
    Now I am stuck in 1.1.0,I cannot downgrade or remove and go to 1.0.0, as it keeps giving me the error for "IInputActionCollection2" not existing (event after deleting the base input file and starting fresh). The keyboard keeps showing the desired keyboard buttons are recognized by Unity, but Unit Input System does absolutely nothing when they are pressed, held, tapped... I could really use some help. The desired input hardware is included in the list of supported devices, and all inputs are found- its just that no Input System events are ever triggered and always return a flatline zero. Something is wrong. I have been following tutorials to the T.
     
  4. EidLoi

    EidLoi

    Joined:
    Nov 20, 2019
    Posts:
    7
    Bit late to the party, but I was looking for this as well. Last info I found is that this is "not supported" and you have to hook up to the start (= performed) and end (= canceled) of the input action.

    As in, store in a bool that the action started/ended and then do your thing in your Update method. You may also need to change the "Action type" to "Pass Through", but even still I had troubles with the events not being consistently fired across devices.
     
  5. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,593
    is this for real? you need to use a bool to register holding down a key/button? this is ridiculous
     
  6. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,907
    depends on what you really want to achieve, if you're making quick time-event-like stuff, like filling up progress bar while holding a binding, then sure, you need to have start animation, progress through animation and end animation too.

    If you simply want to check if a key was held down this frame, then the answer is no.

    Just like necroing a 1.5 years old severely misguided forum post instead of reading the documentation.

    If you want to check on a specific button. If you want to check on a specific Action. And then there are the mouse buttons.
    And here is the Hold interaction if you want to implement quick time event.
     
    Last edited: Dec 9, 2022