Search Unity

Input.GetMouseButtonDown(0) Doesn't Exist???

Discussion in 'Scripting' started by Actnshj200, Nov 23, 2017.

  1. Actnshj200

    Actnshj200

    Joined:
    Mar 7, 2017
    Posts:
    9
    Is this an update issue or An issue with Visual Studio I got 2017. Any feedback will help...
    doesnt exist.PNG
     
  2. gibberingmouther

    gibberingmouther

    Joined:
    Dec 13, 2016
    Posts:
    259
    silly question, but do you have the using statements? UnityEngine and System.Collections? if so, that's odd
     
  3. Actnshj200

    Actnshj200

    Joined:
    Mar 7, 2017
    Posts:
    9
    Yes I do lol. I am able to use the other inputs but the mouse ones.
     
  4. gibberingmouther

    gibberingmouther

    Joined:
    Dec 13, 2016
    Posts:
    259
    does the bracket in line 210 match up with anything?
     
  5. CubicCBridger

    CubicCBridger

    Joined:
    Apr 19, 2017
    Posts:
    44
    You can see that the if statement is outside of the function, as directly below it is the Delay() definition
     
  6. Actnshj200

    Actnshj200

    Joined:
    Mar 7, 2017
    Posts:
    9
    Yea its fixed just visual studio needed to be restarted 10 times :D
     
  7. TaleOf4Gamers

    TaleOf4Gamers

    Joined:
    Nov 15, 2013
    Posts:
    825
    That doesnt make sense.
    As @CubicCBridger mentioned, that if statement was outside of any function which is not allowed.

    Unless im missing something, lets not put incorrect answers now ;)