创建一个新的项目来进行调试:
在main camera下面挂一个测试程式码 在update里面:
void Update () {
//print(Input.GetAxis("Horizontal"));
//print(Input.GetAxis("Vertical"));
//print("Jright:" + Input.GetAxis("Jright"));
//print("Jup:" +Input.GetAxis("Jup"));
//print("padH:" + Input.GetAxis("padH"));
//print("padV:" + Input.GetAxis("padV"));
//print("btn0:" + Input.GetButtonDown("btn0"));
//print("btn1:" + Input.GetButtonDown("btn1"));
//print("btn2:" + Input.GetButtonDown("btn2"));
//print("btn3:" + Input.GetButtonDown("btn3"));
//print("btnLB:" + Input.GetButtonDown("LB"));
//print("btnRB:" + Input.GetButtonDown("RB"));
//print("LT:" + Input.GetAxis("LT"));
//print("RT:" + Input.GetAxis("RT"));
}
当你摇动左蘑菇头的时候会console浮点数
其他以此类推
Edit下拉菜单project setting__input修改键位名称