Is there anyway to get what key is pressed in a frame, outside of using Events in OnGUI or a huge switch statement with all keys.
Input.inputString only returns ascii characters and not arrow keys.
Is there anyway to get what key is pressed in a frame, outside of using Events in OnGUI or a huge switch statement with all keys.
Input.inputString only returns ascii characters and not arrow keys.
yes there is :)
That's used in OnGUI. I'm looking for a way to do it outside if possible.
– tertleany particular reason?
– SirGive@SirGive: I don't know what the OP needs it for, but I've had need for this before as part of a custom input manager system. @The OP: When I did this, I just looped through all the key codes. Obviously that's not terribly efficient, but it's ok for e.g. an input configuration screen, IMO.
– j_y_k