using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// keyc
public Text t;
// Update is called once per frame
void Update () {
if (Input.anyKeyDown)
{
foreach (KeyCode keyCode in Enum.GetValues(typeof(KeyCode)))
{
if (Input.GetKeyDown(keyCode))
{
t.text = "Current Key is : " + keyCode.ToString();
}
}
}
if (Input.GetKeyUp(KeyCode.Escape))
{
Application.Quit();
}
}
}
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// keyc
public Text t;
// Update is called once per frame
void Update () {
if (Input.anyKeyDown)
{
foreach (KeyCode keyCode in Enum.GetValues(typeof(KeyCode)))
{
if (Input.GetKeyDown(keyCode))
{
t.text = "Current Key is : " + keyCode.ToString();
}
}
}
if (Input.GetKeyUp(KeyCode.Escape))
{
Application.Quit();
}
}
}