- Home /
This question was
closed Dec 27, 2013 at 01:43 PM by
ArkaneX for the following reason:
Duplicate Question
This post has been wikified, any user with enough reputation can edit it.
KeyCode parse problem
Hi I am trying to make a small/basic input manager using c# but I am having a bit of a problem, here is where the problem is
...if (Input.GetKey ((KeyCode)System.Enum.Parse(typeof(KeyCode), _controls[2]) )) {
} The _controls is a list of type string and currently in the [2] position I have "W". and this is the error that pops up
UnityException: Input Key named: W is unknown
Can you please help me, thanks
Comment
Have you tried using .GetType()
ins$$anonymous$$d of typeof()
?