UnityEngine.Event

作者:追风剑情 发布于:2019-5-27 13:18 分类:Unity3d

监听键盘按键

private void OnGUI()
{
	Event e = Event.current;
	if (e != null && e.isKey)
	{
		// Esc键
		if (e.keyCode == KeyCode.Escape)
		{
			Application.Quit();
		}
	}
}

标签: Unity3d

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号