Search Unity

Resolved There is a request for InputSystem in Unity official.

Discussion in 'Input System' started by kenzen0, Jul 24, 2021.

  1. kenzen0

    kenzen0

    Joined:
    Sep 17, 2018
    Posts:
    16
    I have a request about InputSystem.
    I want to be able to easily get a bound GetButtonDown like the old Input.

    Example
    Old days
    if(Input.GetButtonDown("Fire")){Debug.Log("Fire");}

    Future
    if(_PlayerInput.actions["Fire"].wasPressedThisFrame){Debug.Log("Fire");}

    Why is there no wasPressedThisFrame for actions?
    I would also like to ask if there are plans to implement it in the future.
     
  2. It is called triggered.
     
  3. kenzen0

    kenzen0

    Joined:
    Sep 17, 2018
    Posts:
    16
    Thanks.
    But with "triggered", I get both ButtonDown and ButtonUp.
    I only want to know ButtonDown.
     
  4. That's strange. I only get one triggered = true, when the performed activates. Are you sure you set up the action properly?
     
  5. kenzen0

    kenzen0

    Joined:
    Sep 17, 2018
    Posts:
    16
    Oh, excuse me.
    The Action setting was wrong.
    Lurking-Ninja fixed it for me, thanks!
     
    Lurking-Ninja likes this.