摘要: http://www.jb51.net/article/54309.htm 阅读全文
posted @ 2016-10-24 23:00 时空观察者9号 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 许多语言中有闭包的概念,C#的闭包以lambda表达式表现,可以实现与LUA完全一样的效果。 可以看到,效果完全一样, 可见,闭包的原理在C#与LUA中是一样的,理解这两种语言的闭包概念的两篇文章: Lambda 表达式(C# 编程指南) Lua中的闭包小结 闭包是造成内存泄露的罪魁祸首,在大型游戏 阅读全文
posted @ 2016-10-24 17:24 时空观察者9号 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 在LUA中情况十分相似,在LUA中,字符串操作与C#完全一样,每次操作都会产生一个新串,大量字符串操作同样会产生大量内存占用。 在LUA中使用table.concat()来实现C#中stringbuilder()的功能,使字符串连接速度提升,内存减少。 经测试,在LUA中直接的字符串连接与使用tab 阅读全文
posted @ 2016-10-24 15:43 时空观察者9号 阅读(2413) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine; using System.Collections; using UnityEditor; //此脚本不一定要放于editor目录下,经测试,放于其它地方也可以 public class testAB { //public static 类型的变量是不会出现在UI上的,因为出现在UI的脚本是实例化的脚本,是属于特定对象的 public ... 阅读全文
posted @ 2016-10-22 13:21 时空观察者9号 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 1 using UnityEngine; 2 using System.Collections; 3 public class testLoadFromAB : MonoBehaviour { 4 5 IEnumerator DownloadAndCache() 6 { 7 while (!Caching.ready) 8 ... 阅读全文
posted @ 2016-10-22 12:50 时空观察者9号 阅读(130) 评论(0) 推荐(0) 编辑
摘要: C:\Users\asus\AppData\LocalLow\Unity\Caches\GiCache 看名字似乎是全局光的缓存,可以通过Edit - Preference - GI Cache,选中 Custom Cache Location来改变缓存的存放位置。 新机安装U3D使用不到一个月,这 阅读全文
posted @ 2016-10-22 11:24 时空观察者9号 阅读(649) 评论(0) 推荐(0) 编辑
摘要: 1 using UnityEngine; 2 using System.Collections; 3 using System.Text; 4 5 public class rotCube : MonoBehaviour { 6 7 //示例,如何为一个自定义对象实现GetEnumerator接口,从而可以对该对象使用foreach 8 //这... 阅读全文
posted @ 2016-10-21 20:09 时空观察者9号 阅读(649) 评论(0) 推荐(0) 编辑
摘要: using System.Collections; using UnityEditor; using UnityEngine; using UnityEngine.UI; /************************************************************************/ /* UnityEngine.WWW 下载与Update()的并行测试,U... 阅读全文
posted @ 2016-10-21 19:51 时空观察者9号 阅读(961) 评论(0) 推荐(0) 编辑
摘要: 2016年12月2号:发现这个标题是错误的,可以在monodevelop中选择.NET的版本,如下:打开solution,右击 Assembly-CSharp,options, build, general, target framework: 下拉列表选择即可。最高版本可选.NET 4.51。 以 阅读全文
posted @ 2016-10-21 16:48 时空观察者9号 阅读(726) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-10-20 16:54 时空观察者9号 阅读(3) 评论(0) 推荐(0) 编辑