Input.touchCount start with 1?


When game is over. i say (if touchCount > 0) restart game.
And when game is started i say(if touchCount == 1) player moves.
The problem is when game is restarted touchCount = 1. So my player starts moving when i’m not clicked yet. Why touchCount starts with 1 and how can i make it starts with 1. Normally on first start; touchCount = 0 but when restarted it starts with 1.

Are you storing touchCount in a var that you made? If so are you resetting that var in the restart() method? I would try to put touchCount = 0 in the Start Method if its being stored. If you are getting it from Unity can you reset it on restart()?