上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: 1. 首先先创建一个Render TexTure 在创建一个RawImage, 再把创建好的Render TexTure (我是随意起的名字,你们自己看着起) ,挂载到 RawImage 的Texture的地方 如下图所示 2.在创建Video Player组件 把Render Texture 挂上 阅读全文
posted @ 2020-10-13 15:53 剑起苍穹 阅读(9916) 评论(0) 推荐(2) 编辑
摘要: 下面直接上代码 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// ***************Unity文字逐 阅读全文
posted @ 2020-10-12 11:23 剑起苍穹 阅读(2098) 评论(0) 推荐(1) 编辑
摘要: 下面直接上代码 1.计时器的实现 第一种方法 /// <summary> /// 秒表的实现方法 创建一个Text 挂在上面即可 /// </summary> private float timeSpend = 0; private int hour; //小时 private int minute 阅读全文
posted @ 2020-10-12 10:45 剑起苍穹 阅读(1686) 评论(0) 推荐(0) 编辑
摘要: 这是unity里面的Animator 一共俩个状态一个静止一个攻击,下面是图片 下面是代码挂在人物上即可,自己可以运行打印一下 using System.Collections; using System.Collections.Generic; using UnityEngine; public 阅读全文
posted @ 2020-04-15 15:00 剑起苍穹 阅读(2786) 评论(0) 推荐(0) 编辑
摘要: UGUI精准拖拽 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; [RequireComponent(typeof(RectT 阅读全文
posted @ 2020-02-27 10:46 剑起苍穹 阅读(2898) 评论(2) 推荐(0) 编辑
摘要: UGUI 根据UGUI的射线检测机制获取当前鼠标下的UI /// <summary> /// 获取鼠标停留处UI /// </summary> /// <param name="canvas"></param> /// <returns></returns> public GameObject Ge 阅读全文
posted @ 2020-02-25 17:29 剑起苍穹 阅读(1479) 评论(0) 推荐(0) 编辑
摘要: 首先判断 两次的位置大小 缩放代码如下 private Vector2 oldops1; private Vector2 oldops2; //比较两次的位置,大小,来进行放大还是缩小 bool isEnlargc(Vector2 op1, Vector2 op2, Vector2 np1, Vec 阅读全文
posted @ 2020-02-25 10:28 剑起苍穹 阅读(2056) 评论(0) 推荐(0) 编辑
摘要: 射线检测的坑 有时侯我们想在射线检测的时候忽略掉某些物体的碰撞,从而达到检测物体背后的物体的碰撞,这是个时候我们使用layerMask layerMask参数使用按位与<<设置的一些总结: 1 << 10 打开第10的层。~(1 << 10) 打开除了第10之外的层。~(1 << 0) 打开所有的层 阅读全文
posted @ 2020-02-20 15:38 剑起苍穹 阅读(3876) 评论(0) 推荐(0) 编辑
摘要: ugui 在物体上实时更新位置 本脚本挂在那个地方都行 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UICollor 阅读全文
posted @ 2019-12-23 15:58 剑起苍穹 阅读(1238) 评论(0) 推荐(0) 编辑
摘要: 关于判断鼠标在不在UI上 unity有自带的方法,很简单,关于射线的穿透也可以用下面方法 下面是代码: 这里需要引用 using UnityEngine.EventSystems; 命名空间 EventSystem.current.IsPointerOverGameObject()==true 的时 阅读全文
posted @ 2019-12-17 09:20 剑起苍穹 阅读(2893) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
/*鼠标点击特效*/