Answers for "how to detect key press in unity editor script"

C#
7

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
1

press key run code unity c#

if(Input.GetKey(KeyCode.space))
	{
  		print("Space key was pressed")
	}
Posted by: Guest on May-26-2020

Code answers related to "how to detect key press in unity editor script"

C# Answers by Framework

Browse Popular Code Answers by Language