Quantcast
Channel: Answers for "How to activate someting if a key is held down?"
Browsing all 4 articles
Browse latest View live

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

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
Browsing all 4 articles
Browse latest View live


Latest Images