Search Unity

[Request] Begin press Phase

Discussion in 'Input System' started by Arokma, Sep 5, 2019.

  1. Arokma

    Arokma

    Joined:
    Oct 14, 2015
    Posts:
    20
    Hi,
    On a small project, I'm trying to achieve this :
    1. An event occurs every frame if a button is held
    2. This event stops when the same button is released
    3. A specific event is called when the button was just triggered (only the first frame)
    I could achieve the 3rd phase by creating a boolean knowing the state of the previous frame.
    I could also make two actions for the first press and the held state.

    But I am very surprised I cannot have this single action and just look for what was on the old Input system
    phase.Began

    The states are a little weird for this situation as "Started" is called every frame and "Performed" is never triggered...

    Am I forgetting something ? If not, I think it would be nice to implement the "Began" state.

    Thanks.
    Rémi from Arokma.