【发布时间】:2017-09-12 08:46:05
【问题描述】:
【问题讨论】:
标签: unity3d bluetooth controller
【问题讨论】:
标签: unity3d bluetooth controller
连接蓝牙控制器后,操作系统会将其作为设备处理。然后你只需要找出哪个Key对应哪个KeyCode。
例如,你可以这样写
public void detectPressedKeyOrButton()
{
foreach(KeyCode kcode in Enum.GetValues(typeof(KeyCode)))
{
if (Input.GetKeyDown(kcode))
Debug.Log("KeyCode down: " + kcode);
}
}
【讨论】: