unity OnMouseDown 不能监测鼠标右键点击事件
生活随笔
收集整理的這篇文章主要介紹了
unity OnMouseDown 不能监测鼠标右键点击事件
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
There isn't an OnMouseDown function for anything other than the left button, but you can sort of override OnMouseOver instead, like this:
function OnMouseOver () {if (Input.GetMouseButton(1)) {// do something} }如果是監(jiān)測(cè)鼠標(biāo)右鍵按下或抬起改為Input.GetMouseButtonDown(1)、Input.GetMouseButtonUp(1)即可轉(zhuǎn)自:http://answers.unity3d.com/questions/18875/right-mouse-detection.html
總結(jié)
以上是生活随笔為你收集整理的unity OnMouseDown 不能监测鼠标右键点击事件的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 船舶和计算机结合论文格式,船舶与海洋工程
- 下一篇: ios 输入法扩展_动态输入法 iOS