02 2020 档案

摘要:UGUI精准拖拽 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; [RequireComponent(typeof(RectT 阅读全文
posted @ 2020-02-27 10:46 剑起苍穹 阅读(2949) 评论(2) 推荐(0) 编辑
摘要:UGUI 根据UGUI的射线检测机制获取当前鼠标下的UI /// <summary> /// 获取鼠标停留处UI /// </summary> /// <param name="canvas"></param> /// <returns></returns> public GameObject Ge 阅读全文
posted @ 2020-02-25 17:29 剑起苍穹 阅读(1570) 评论(0) 推荐(0) 编辑
摘要:首先判断 两次的位置大小 缩放代码如下 private Vector2 oldops1; private Vector2 oldops2; //比较两次的位置,大小,来进行放大还是缩小 bool isEnlargc(Vector2 op1, Vector2 op2, Vector2 np1, Vec 阅读全文
posted @ 2020-02-25 10:28 剑起苍穹 阅读(2124) 评论(0) 推荐(0) 编辑
摘要:射线检测的坑 有时侯我们想在射线检测的时候忽略掉某些物体的碰撞,从而达到检测物体背后的物体的碰撞,这是个时候我们使用layerMask layerMask参数使用按位与<<设置的一些总结: 1 << 10 打开第10的层。~(1 << 10) 打开除了第10之外的层。~(1 << 0) 打开所有的层 阅读全文
posted @ 2020-02-20 15:38 剑起苍穹 阅读(4021) 评论(0) 推荐(0) 编辑

/*鼠标点击特效*/
点击右上角即可分享
微信分享提示