Returns true during the frame the user releases the key identified by name.
function Update () {
if (Input.GetKeyUp ("space"))
print ("space key was released");
}
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Update() { if (Input.GetKeyUp("space")) print("space key was released"); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Update() as void: if Input.GetKeyUp('space'): print('space key was released')
Returns true during the frame the user releases the key identified by the key KeyCode enum parameter.
function Update () {
if (Input.GetKeyUp (KeyCode.Space))
print ("space key was released");
}
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Update() { if (Input.GetKeyUp(KeyCode.Space)) print("space key was released"); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Update() as void: if Input.GetKeyUp(KeyCode.Space): print('space key was released')