上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
该文被密码保护。 阅读全文
posted @ 2016-09-27 10:23 哎呦不能错喔 阅读(5) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-09-25 15:21 哎呦不能错喔 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 根据图片的透明度来判断是否点击到了适当区域(如果a值是0,说明完全透明,则判断为没点击,否则判断为触发点击) 将脚本赋给Image图片,然后将图片的格式改为Advanced, 勾上Read/Write Enabled。 因为继承了Image,所以脚本上也会出现Raycast Target等一系列属性 阅读全文
posted @ 2016-07-21 09:12 哎呦不能错喔 阅读(1497) 评论(0) 推荐(1) 编辑
该文被密码保护。 阅读全文
posted @ 2016-07-20 15:03 哎呦不能错喔 阅读(3) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine; using System.Collections; public class Demo : MonoBehaviour { #if UNITY_EDITOR void Reset() { Debug.Log("把脚本添加到某个物体上就会执行,之后再按物体右上角小三角弹出对话框里的reset也会执行。"); } ... 阅读全文
posted @ 2016-07-20 14:21 哎呦不能错喔 阅读(1478) 评论(0) 推荐(0) 编辑
摘要: 放到Editor文件夹下就行啦~ 忽然发现 target直接就是当前选中object,所以并不用手动获取objs,而是直接使用target就可以了。 但是首先要先将target类型转换为gameobject, 即: GameObject obj = target as GameObject; 然后获 阅读全文
posted @ 2016-07-20 11:37 哎呦不能错喔 阅读(1882) 评论(0) 推荐(0) 编辑
摘要: 打包代码完成的功能是: 先把选中预设们公用的那个贴图打包了。然后再打包选中的这几个预设(贴图名字是“z”,预设们名字是 t1和t2)通过push压栈和pop出栈来隔离开,内层可以包含外层的引用,但不包含外层的资源本身。 加载代码的逻辑是:为了试验一下是否有依赖关系,先加载预设t2,等确保加载出来之后 阅读全文
posted @ 2016-07-06 14:04 哎呦不能错喔 阅读(634) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-06-20 17:48 哎呦不能错喔 阅读(27) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine; using System.Collections; public class ZRay : MonoBehaviour { private static ZRay instance; public static ZRay Instance { get { if (instance == null)instanc... 阅读全文
posted @ 2016-06-16 14:03 哎呦不能错喔 阅读(302) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2016-05-13 10:49 哎呦不能错喔 阅读(31) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页