Unity Input 鼠标模拟
来源:互联网 发布:网络用语安利的意思 编辑:程序博客网 时间:2024/05/21 04:21
Unity官方用户手册里有这么一段话:
Mouse Simulation
On top of native touch support Unity iOS/Android provides a mouse simulation. You can use mouse functionality from the standardInput class.
翻译为:
鼠标模拟
除了原有的触摸支持以外,Unity iOS/Android还提供了鼠标模拟。你可以通过标准的Input类来使用鼠标功能。
那么,Input类中有哪些鼠标功能呢?
查看Input类的成员可以找到
在iOS/Android中,手指按下(anykey)或一直触摸不松开(anykeydown)即可返回true
返回手指触摸的屏幕坐标
手指按下,松开或一直触摸不松开即可返回true
我们在iOS/Android中任一手指触摸都被视为"mouse 0",也就是KeyCode.Mouse0,对应着鼠标左键。
实际上,除了上述成员外,input类的其它一些成员也具有鼠标功能:
所以我们也可以在移动设备中使用上述函数来实现鼠标模拟。
值得注意的是,使用多个手指触摸移动设备时,mousePosition的值为所有触摸位置的中心点。
0 0
- Unity Input 鼠标模拟
- unity的input鼠标
- Unity中模拟鼠标事件
- Unity: Unity3D 模拟鼠标单击/双击
- Unity 模拟鼠标自动点击事件
- Unity Input.anyKeyDown和模拟键盘按下事件
- unity ------- input
- Unity Input
- 【Unity】unity 鼠标画线
- Unity 鼠标事件 GUI GUILayerOut Input Application(截屏,getMouseDown,getKeyCode) 射线
- Unity Input Touch
- unity Input Touch
- Unity transform和Input
- Unity Transform和Input
- Unity Mobile Device Input
- Unity Input Touch fingerId
- Unity 基础 - Input 类
- Unity 入门 Input 类
- Allegro里隐藏GND或者电源网络的鼠线/ 显示隐藏的鼠线,修改网络颜色
- yum的lock 问题
- Ubuntu下Hadoop MapReduce集群搭建以及程序运行
- mysql主从配置
- C/S架构和B/S架构的概念和区别
- Unity Input 鼠标模拟
- 【ORACLE RAC】crs启动失败 crs_start -all CRS-0184: Cannot communicate with the CRS daemon.
- Android Intent详解
- cross compile openssl
- web请求---小结
- IOS几种简单有效的数组排序方法
- javac 在cmd的命令
- U-Boot 启动过程和源码分析(第二阶段)
- MySQL的my.cnf配置参数详解