- 博客(9)
- 收藏
- 关注
原创 Unity射线检测
射线检测 一般情况是从摄像机到鼠标点击位置生成射线。 void Update () { if (Input.GetMouseButtonDown(0)) { Ray ray = _cam.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit...
2020-02-19 16:37:05
242
原创 图片像素格式转换YUV&RGB公式
RGB转YUV Y = 0.299*R + 0.587*G + 0.114*B; U = -0.169*R - 0.331*G + 0.5 *B ; V = 0.5 *R - 0.419*G - 0.081*B; YUV转RGB R = Y + 1.4075 * V; G = Y - 0.3455 * U - 0.7169*V; B = Y + 1.779 * U; ...
2019-06-20 15:22:06
786
原创 保存Unity中的Log日志
代码中的debug日志保存本地 using System.Collections; using UnityEngine; using System.IO; public class SaveLog : MonoBehaviour { private float length; Queue queue; private void Awake() { ...
2019-06-17 15:19:42
5777
原创 Unity WWW 与C#的IO
WWW访问非本地目录 WWW w = new WWW("https://www.bilibili.com"); www访问本地目录 WWW m_www = new WWW("file://"+Application.dataPath + "\\Resources\\yelv.MP4"); C#IO操作 FileInfo file = new FileInfo(Appli...
2019-06-14 12:14:38
381
转载 C#正则常用表达式
㈠校验数字的表达式 //数字 Regex reg = new Regex(@"^[0-9]*$"); //n位的数字 Regex reg = new Regex(@"^\d{n}$"); //至少n位的数字 Regex reg = new Regex(@"^\d{n,}$")...
2019-04-03 17:17:16
137
原创 unity的2d Animation制作简单的动画
1、准备序列图一张(7*7)png格式 2、导入unity,将图片格式修改为sprite(2D and UI),把SpriteMode 改成Multiple,然后apply保存。 3、点击SpriteEditor 打开编辑界面,分割图片。保存。然后unity会自动生成1-n的序列图。接下来要用的就是这些序列图。 4、场景中新建一个image。把序列的第一张放进去。 5、在im...
2018-12-26 11:45:26
4491
转载 android Ant 批量多渠道打包
可参考:https://blog.csdn.net/tenggangren/article/details/8051937
2018-07-17 17:10:30
170
转载 ANT 打包出现Could not load definitions from resource net/sf/antcontrib/antcontrib.properties.
具体解决办法 请参考 https://blog.csdn.net/l_lhc/article/details/50896850
2018-07-17 17:08:49
5107
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人