↧
Answer by Julien-Lynge
Take a look at the Input class. The answer is there: http://docs.unity3d.com/Documentation/ScriptReference/Input.html Take a look at the class functions.
View ArticleAnswer by Azial
if (Input.GetKey(keyNum.ToString()) {…} 'keyNum' can be any key you want e.g. var keyNum : int = 1; or var keyNum : String = "k";
View Article