Answers for "unity key detection"

C#
20

unity key detection

if (Input.GetKeyDown(KeyCode.Space))
        {
            print("space key was pressed");
        }
Posted by: Guest on January-17-2020
4

if get key down 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
4

unity key detection

void Update()
    {
        if (Input.GetKeyDown("space"))
        {
            print("space key was pressed");
        }
    }
Posted by: Guest on May-10-2020

C# Answers by Framework

Browse Popular Code Answers by Language