Search Unity

Is regular Input bugged in 2019.2?

Discussion in 'Editor & General Support' started by ZoidbergForPresident, Sep 10, 2019.

  1. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    157
    I was following some course and ended up with this very simple code in a 2D project and the if here is not always called when Fire1 is pushed!

    if (Input.GetButtonDown("Fire1"))
    {
    _rigidbody2D.AddForce(Vector2.up * _jumpForce);
    }

    After messing up around and still getting this erratic behaviour, I decided to recreate an empty 2D project with just an empty gameobject and a simple script where I log when the player pushes the "Jump" button in the update method.

    And I get errors in the console about "Jump" not existing as an input...

    What gives?
     
  2. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    157
    Oh gosh, never mind that. It was atually a bug in the program due to layers. ^^'