- Home /
Input.GetKey not working
In my first script i had a set of functions that were called with Input.GetKeyDown(KeyCode,LeftAlt), and everything worked properly. Then, in another script, i made Input.GetKeyDown(KeyCode.X) call a certain function but ever since i added the second getkeydown, neither of them are working. I made an if statement where getkey, getkeydown and getkeyup trigger a print("KeyGet") but i'm not getting any logs in the console. My Keyboard is working properly, and i'm focused on the Game window whenever i try pressing the keys, but nothing ever happens. I don't thing it's a problem with the code (it's too simple), any ideas?
additional info: all of the GetKeys are in private void update, the project is set up for android development and i have a remote connected, the scripts are in the scene working perfectly fine (i even put print("update") in there to check)
EDIT: i tried using getbuttondown instead and rebooting my computer, no luck
Answer by OfficerSugar · Jan 13, 2018 at 08:45 AM
okaaaaay, so turns out i must've accidentally changed the joystick source in unity remote settings from local to remote, changed it back and everything is working ¯_(ツ)_/¯