As the title suggests, I am having an issue where the spacebar input specifically is not able to be detected. My code currently reads:
if (Input.GetKeyDown(KeyCode.Space))
After which I will print something to my console. When using KeyCode.Space, nothing is registering, but if I change it to say "KeyCode.A"
, I can press A instead, and everything registers just fine.
My project is basically brand new, and I have very few lines of code, none of which might interfer and cause issues with the input. I am not detecting any other keystrokes and the other parts of the script is made up of simple math operations and print statements.
Again, this issue is solely happening when trying to detect my spacebar; all other keys are working just fine.
Thanks in advance!
EDIT: After doing some more testing, it seems that while other keystrokes seem much more consistent, they do not work ong every run. Sometimes when I press play, the keystroke will work every single time and other times they will work none of the times. In other words, it is not that they are inconsistent within a “run”, but that they are either 100% working or 0% working, with no in-between.