Input
Functions
MouseButtonDown
function Input.MouseButtonDown()
Input.MouseButtonDown
Returns true if the mouse button was pressed down on this exact frame.
MouseButton
function Input.MouseButton()
Input.MouseButton
Returns true if the mouse button is being pressed at this frame.
ButtonDown
function Input.ButtonDown()
Input.ButtonDown
Returns true if the button was pressed down on this exact frame.
Button
function Input.Button()
Input.Button
Returns true if a button is being pressed at this frame.
GetKeyUp
function Input.GetKeyUp((KeyCode)KeyCode)
Parameter | Type | Description |
---|---|---|
KeyCode | KeyCode |
The Keycode. It uses KeyCode unity enum values. You can find the available keycodes here: https://docs.unity3d.com/ScriptReference/KeyCode.html |
Input.GetKeyUp
Returns true if the Key was released on this exact frame.
Example
Input.GetKeyUp(KeyCode.A)
GetKeyDown
function Input.GetKeyDown((KeyCode)KeyCode)
Parameter | Type | Description |
---|---|---|
KeyCode | KeyCode |
The Keycode. It uses KeyCode unity enum values. You can find the available keycodes here: https://docs.unity3d.com/ScriptReference/KeyCode.html |
Input.GetKeyDown
Returns true if the Key was pressed down on this exact frame.
Example
Input.GetKeyDown(KeyCode.A)
GetKey
function Input.GetKey((KeyCode)KeyCode)
Parameter | Type | Description |
---|---|---|
KeyCode | KeyCode |
The Keycode. It uses KeyCode unity enum values. You can find the available keycodes here: https://docs.unity3d.com/ScriptReference/KeyCode.html |
Input.GetKey
Returns true if a Key is being pressed at this frame.
Example
Input.GetKey(KeyCode.A)