11 2013 档案

摘要:EZGUI的使用过程中,有时需要使用动态的图片,比如商店里面商品的ICON,好友的头像等,通过使用SimpleSprite可以实现这个功能。比如一个通过网络显示好友头像:WWW www = new WWW("FriendIconPath");yield return www;SimpleSprite ss = myTransform.GetComponent();ss.SetTexture(www.texture);//设定图片ss.SetUVs(new Rect(0,0,1,1));//设定UV最后一句:ss.SetUVs(new Rect(0,0,1,1));比较重要, 阅读全文
posted @ 2013-11-02 15:24 facewater 阅读(354) 评论(0) 推荐(0) 编辑
摘要:此贴会持续更新,都是项目中常会遇到的问题,总结成贴,提醒自己和方便日后检查,也能帮到有需要的同学。若各位有啥好BUG好异常好警告好崩溃可以分享的话,请多多指教。xuzhiping7#qq.com。1.U3D经常莫名奇妙崩溃。一般是由于空异常造成的,多多检查自己的引用是否空指针。2.编码切换警告提示。警告提示:Some are Mac OS X (UNIX) and some are Windows.This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can 阅读全文
posted @ 2013-11-02 15:22 facewater 阅读(3184) 评论(0) 推荐(0) 编辑
摘要:楼层一层一层的加,把模型分开,弄成prefab放到Resourse文件夹里,在代码里用Instantiate(Resources.Load("模型名字") as GameObject);不同的按钮用Resources.Load加载不同的物体。加载其中一个prefab的时候如何把之前加载的Prefab销毁呢?因为prefab后面会加(clone),所以可以用destroy(XXX(clone));文章转载:http://www.j2megame.com/html/xwzx/ty/2623.html动态加载FBX文件 方法1(已测试过) 1 将模型拖动到场景中,调整好位置。(制 阅读全文
posted @ 2013-11-02 15:09 facewater 阅读(1024) 评论(0) 推荐(0) 编辑
摘要:Application.dataPath : 数据路径Unity Editor:/AssetsUnity 编辑器:/AssetsMac player:/ContentsMac播放器:/ContentsiPhone player://DataiPhone播放器://DataWin player:Win播放器:\DataDashboard widget:Dasboard窗口:Web player:The absolute url to the player data file folder (without the actual data file name)网络播放器:到播放器数据文件夹的绝对路 阅读全文
posted @ 2013-11-02 11:03 facewater 阅读(1300) 评论(0) 推荐(0) 编辑
摘要:1 GUI汇总function OnGUI() { GUI.Label(Rect(1,1,100,20),"I'm a Label"); //1 GUI.Box(Rect(1,21,100,20),"I'm a Box"); //2 GUI.Button(Rect(1,41,100,20),"I'm a Button"); //3 GUI.RepeatButton(Rect(1,61,120,20),"I'm a RepeatButton"); //4 GUI.TextField(R 阅读全文
posted @ 2013-11-02 09:51 facewater 阅读(765) 评论(1) 推荐(0) 编辑