RB.KeyDown
Method - Static
public static bool KeyDown(KeyCode keyCode)
|
Parameters
Returns
bool
True if key held down
DescriptionReturn true if given key specified by keyCode is held down. Examplevoid Update() { if (RB.KeyDown(UnityEngine.KeyCode.Z)) { FireLasers(); } } |
See AlsoRB.KeyReleased RB.KeyPressed RB.InputStringSee DocsFeatures - Keyboard |