Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"Hold" interaction for the new input system works only once

Discussion in 'Input System' started by Roboserg, Feb 14, 2021.

  1. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    I set up two actions that use the same buttons, the ChangeRacer needs the button to be held (long hold)


    And in the code, I listen to the events from the new input system. The problem is, the ChangeRacer action (holding the button) works only the FIRST time around,
     Debug.Log(context.phase);
    does not print anything after this action has been performed


    Video ->

    It weird that "Canceled" gets printed BEFORE this action if performed the first time. After that "canceled" is printed only after I exit the play mode.

    ps. I put the interactions on the ChangeRacer action, it didn't help.
    pss. Unplugging xbox gamepad solves the problem. Plugging the gamepad back in introduces the problem.
    psss. Using Unity 2020.2.4f1 with Input System 1.0.2 on WIndows 10.
     
    Last edited: Feb 14, 2021
  2. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    618
    @Rene-Damm

    Chiming in here, I debugged this on Discord with @Roboserg

    This issue exclusively appears when both a Gamepad and Keyboard are plugged in and is repeatable in isolation. Physically unplug gamepad and the issue disappears, replug and it returns.

    Do you already have this in bug tracker somewhere or is there something else at play here?
     

    Attached Files:

    KAJed likes this.
  3. GUSRG

    GUSRG

    Joined:
    Feb 29, 2020
    Posts:
    6
    Same problem here, any update on this problem?
     
  4. theUSpopulation

    theUSpopulation

    Joined:
    Sep 17, 2017
    Posts:
    2
    Too add on to this, it does NOT occur with analog gamepad triggers. It is an annoying bug though and I hope it gets fixed.
     
    acikgozac likes this.
  5. pitchblende

    pitchblende

    Joined:
    Jan 9, 2020
    Posts:
    71
    h0048625, Roboserg and dbdenny like this.
  6. acikgozac

    acikgozac

    Joined:
    Mar 20, 2019
    Posts:
    1
    It works Thank you!
     
  7. h0048625

    h0048625

    Joined:
    Jan 1, 2019
    Posts:
    1
    Update to new version (1.2.0)fixed the problem. Thanks a lot!