Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.
Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.
CerrarPor alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.
CerrarReturns true during the frame the user releases the key identified by name
.
You need to call this function from the Update function, since the state gets reset each frame.
It will not return true until the user has pressed the key and released it again.
For the list of key identifiers see Input Manager.
When dealing with input it is recommended to use Input.GetAxis and Input.GetButton instead
since it allows end-users to configure the keys.
function Update () { if (Input.GetKeyUp ("space")) print ("space key was released"); }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Update() { 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 ExampleClass : MonoBehaviour { void Update() { if (Input.GetKeyUp(KeyCode.Space)) print("space key was released"); } }