Detección de llave de la unidad
if (Input.GetKeyDown(KeyCode.Space))
{
print("space key was pressed");
}
RyanGar46
if (Input.GetKeyDown(KeyCode.Space))
{
print("space key was pressed");
}
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour
{
void Update()
{
if (Input.GetKeyDown("space"))
{
print("space key was pressed");
}
}
}
public void Update()
{
if (Input.GetKeyUp(KeyCode.X))
{
//do stuff
}
}
if(Input.GetKey(KeyCode.space))
{
print("Space key was pressed")
}