Unity3D插件之FingerGestures:手势插件
来源:互联网 发布:乌鲁木齐seo名录 编辑:程序博客网 时间:2024/05/15 13:10
功能较多,目前刚用到,点选功能和双指缩放功能。
点选功能的官方教程http://fingergestures.fatalfrog.com/docs/manual:tutorial_detect_tap,翻译整理如下:
1、安装插件
2、从插件目录Plugins/FingerGestures/Prefabs/拖动FingerGestures到Hierarchy视图里(也可以建立empty object 然后添加 “FingerGestures” component)
3、创建一个新GameObject命名为“Gestures”
4、添加TapRecognizer component到刚才新建的GameObjec“Gestures”。步骤是点击“AddComponent" > FingerGestures > Gestures > Tap
5、添加ScreenRaycaster component到“Gestures”
5、添加脚本命名为Tap.cs,并且拖动关联到“Gestures”。内容为:
using UnityEngine;using System.Collections;public class Tap : MonoBehaviour {void OnTap( TapGesture gesture ) { if (gesture.Selection) {Debug.Log ("Tapped object: " + gesture.Selection.name);} else {Debug.Log ("No object was tapped at " + gesture.Position);}}}
6、确认被点选的物体有collider,没有就手工AddComponent
7、运行,看到点击有collider的物体会log其名称,其他地方显示position
0 0
- Unity3D插件之FingerGestures:手势插件
- Unity3D FingerGestures 手势插件使用
- Unity手势插件FingerGestures
- unity3D的FingerGestures插件
- unity3D的FingerGestures插件
- unity3D的FingerGestures插件
- unity3D的FingerGestures插件
- unity3D的FingerGestures插件
- unity3D的FingerGestures插件
- Unity FingerGestures 手势插件教程
- FingerGestures手势插件的使用
- Unity手势操作FingerGestures插件
- unity手势插件《FingerGestures 》使用入门
- unity手势插件《FingerGestures 》使用入门
- unity3D的FingerGestures插件详细说明
- Unity手势插件FingerGestures使用遇到的问题
- 【Unity插件】FingerGestures 插件使用
- Unity3D之FingerGestures使用
- 【 nginx模块学习】nginx_http_push_module模块深入讲解和聊天室实现
- C++sort 函数用法
- 用双端队列实现单调队列
- liunx学习笔记之
- 【面试】TCP和UDP的区别
- Unity3D插件之FingerGestures:手势插件
- 谈谈Android自动安装技术 应用程序 自动推送 自动安装
- Android Studio在创建项目是一直处于building “project name”gradle project info的解决办法
- linux基础命令之ssh的key认证和网络基础
- 2016年中国大学生程序设计竞赛(杭州)
- Unity3D中脚本的执行顺序和编译顺序
- Qt4.8编译mysql5.5
- effective C++之内联函数
- Hadoop Mahout 推荐系统