EasyTouch丨实用API

大家好,我是SKODE。

小提示:选中左侧目录,可快速找到所需内容

本系列博客地址:传送门

本章介绍 EasyTouch的实用API,帮助大家找到需要的API功能。

Gesture current = EasyTouch.current;

//当前手势的类型(On_TouchStart...)
EasyTouch.EvtType currentGestureType = current.type;

//当前选择到的物体
GameObject currentPick = current.pickedObject;

1、得到当前第一根手指,点击到哪个碰撞物体

Debug.Log(EasyTouch.GetCurrentPickedObject(0, false));
Debug.Log(EasyTouch.current.GetGesture().pickedObject);

2、得到当前第一根手指,点击到哪个UI元素

Debug.Log(EasyTouch.GetCurrentPickedUIElement(0, false));
Debug.Log(EasyTouch.current.GetGesture().pickedUIElement);
原创文章 347 获赞 98 访问量 23万+

猜你喜欢

转载自blog.csdn.net/weixin_38239050/article/details/105922089