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