Search Unity

Get Button Down in the new input system.

Discussion in 'Input System' started by alexxjaz, Aug 9, 2020.

  1. alexxjaz

    alexxjaz

    Joined:
    Sep 18, 2018
    Posts:
    45
    Hello! Im using the new input system to make a coop game.
    The thing is that I want to set a bool true only if I click (Like the GetButtonDown)
    Now, Im using this piece of code:

    Code (CSharp):
    1.     public bool onAction01;
    2.     public void CallbackAction01(CallbackContext context)
    3.     {
    4.         onAction01 = context.started;
    5.     }
    And that is being called as an Event (Im using events since the other player would control the other one if I dont get the context.)

    context.Started will never return true, and performed will be true as long as it is being pressed (Like GetButton).

    What am I missing?

    In the Input Action I just have this:

    upload_2020-8-9_18-57-32.png