- Home /
Question by
Paul 7 · Sep 10, 2010 at 06:52 PM ·
inputgetmousebuttondown
Input.GetMouseButtonDown(0) always false
I am calling this in a update() and its always false. No idea why I can get any mouse input at all. Anyone know anything about this? All other keys work fine.
Comment
Answer by AliAzin · Sep 10, 2010 at 07:18 PM
try these steps and see if it works:
1- create new scene.
2- create a java script and write this in it :
function Update(){
if (Input.GetMouseButtonDown(0))
print ("it works !");
}
3- save the script and attach it to your main camera.
4- play the editor.
5- click left mouse button in the game window and see if anything printed out on console.
Answer by Paul 7 · Sep 10, 2010 at 07:52 PM
Ok, found the bug. My game tab was on its own window and not taking input for any of my mouse clicks. I moved the game tab to the Unity window and it all worked fine. I will submit the bug to unity.