Quantcast
Channel: Answers for "How to activate someting if a key is held down?"
Browsing index pages (4 articles)

Answer 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


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 Article


Answer 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

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 Article
Browsing index pages (4 articles)


Latest Images