Hi, I made a build so that I could bug test with a couple friends of mine, but I had the developer console enabled so they could tell me when/if they get any errors, but the console is constantly spammed with the message “ArgumentException: Input Key named: LeftAlt is unknown.”
The only time the string “LeftAlt” is used in anything that I’ve coded, is KeyCode.LeftAlt, but nothing else, and this error is NOT shown at all in the editor.
I even created a new input button “LeftAlt” just thinking that might fix it, but it didn’t.
Thanks in advance!
If you use any Input.GetKey… method in conjunction with KeyCode.LeftAlt then it’s probably a Unity Bug and you should file a bug report. At least the docs list this button and if you get your game compiled it’s definitely there.
Or is it, that you do compile for a platform not supporting it (Android, iOS…), just a guess.
You most likely used the string “LeftAlt” somewhere. However the string key names have a different contention as the enum members in the KeyCode enum. See the very bottom of this page. The left alt key name is “left alt”. You should avoid using string key names whenever possible. If you need to pass a key as parameter to a method you should use the KeyCode enum when possible.