inputString returns blank for non-char keys
I'm designing a cheat code system similar to Doom or Contra where the player must enter a sequence of inputs in the correct order. I've done this by creating a string array for the key names of required inputs and an index counter to move through them. If the wrong key is pressed at any time, the index resets to 0.
This mostly works except for the fact that any non-char key, such as the arrows keys, spacebar, return, etc. doesn't send a name in its string through inputString. Am I missing something or are there specific key codes needed?
Why don't you fill your array with $$anonymous$$eyCode
s ins$$anonymous$$d of char
?
I did this at one point, but the problem is that the special keys are returning blank codes.
I would be very curious to see how you have implemented this.... There is no reason this would not work with $$anonymous$$eyCodes....
Your answer
Follow this Question
Related Questions
Input.inputString and Input.GetKeyDown do nothing 0 Answers
Using one key only, change bool to true or false depending on it's current value 2 Answers
Convert keycode to string 1 Answer
What is the Input reference for the ² key ? 1 Answer
FormatException: Input string was not in the correct format System 0 Answers