input是用来截获鼠标,键盘的消息
输入Input类使用建议在Updata()方法内使用。官方文档如是说:
–Note also that the Input flags are not reset until “Update()”, so its suggested you make all the Input Calls in the Update Loop.
Unity Input事件详解与应用
本文介绍了Unity中Input类的使用,重点在于Update()方法内处理Input事件,并建议使用GetButton()替代GetKey(),以方便后期修改。内容包括:Input.GetAxis()用于处理垂直和水平方向的输入,Input.GetKey()检测键盘按键,Input.GetMouseButtonDown()和Input.GetButtonDown()分别用于检测鼠标按键的按下和开始按下状态。
input是用来截获鼠标,键盘的消息
输入Input类使用建议在Updata()方法内使用。官方文档如是说:
–Note also that the Input flags are not reset until “Update()”, so its suggested you make all the Input Calls in the Update Loop.

被折叠的 条评论
为什么被折叠?