Anton Danilov
0
Q:

unity key detection

if (Input.GetKeyDown(KeyCode.Space))
        {
            print("space key was pressed");
        }
15
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void Update()
    {
        if (Input.GetKeyDown("space"))
        {
            print("space key was pressed");
        }
    }
}
5
    void Update()
    {
        if (Input.GetKeyDown("space"))
        {
            print("space key was pressed");
        }
    }
3

New to Communities?

Join the community