Answers for "unity do something when key i pressd fully"

C#
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

Code answers related to "unity do something when key i pressd fully"

C# Answers by Framework

Browse Popular Code Answers by Language