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.

[Request] Begin press Phase

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

  1. Arokma


    Oct 14, 2015
    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

    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.

    Rémi from Arokma.