Answers for "how to check for key press unity"

C#
10

unity check if key pressed

if (Input.GetKeyDown(KeyCode.KEY))
Posted by: Guest on June-15-2020
5

idenitfy if you press a key in unity

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void Update()
    {
        if (Input.GetKeyDown("space"))
        {
            print("space key was pressed");
        }
    }
}
Posted by: Guest on January-25-2020
3

unity detect any key

if (Input.anyKey) {
  // Code here
}
Posted by: Guest on June-24-2020

Code answers related to "how to check for key press unity"

C# Answers by Framework

Browse Popular Code Answers by Language