随笔分类 -  C#--U3D

Unity目录结构
摘要:http://www.cnblogs.com/liudq/p/5540051.htmlUnity中有几个默认目录 Unity5.x Resources 项目中默认的资源路径,会直接打包到游戏包中。即使没有被使用过的资源,放在该目录下也会被打包。 Plugins 插件目录,该目录在编译项目时,会优先编译,方便项目中代码调用。它与Standard Assets目录的代码共同编译到同一个.sln里。 ... 阅读全文
posted @ 2016-09-02 09:15 602147629 阅读(1007) 评论(0) 推荐(0)
加载的时候遇见安全沙箱问题
摘要:http://blog.gamerisker.com/archives/461.html#more-461 阅读全文
posted @ 2016-05-20 21:08 602147629 阅读(143) 评论(0) 推荐(0)
常用的正则表达式代码汇总
摘要:[转]http://blog.csdn.net/tammy520/article/details/8680664 阅读全文
posted @ 2016-05-17 10:19 602147629 阅读(744) 评论(0) 推荐(0)
批量设置AssetBundleName
摘要:using UnityEngine; using System.Collections; using UnityEditor; using System.IO; public class ChangeName : MonoBehaviour { // public string versionDir 阅读全文
posted @ 2016-03-03 18:10 602147629 阅读(1179) 评论(0) 推荐(0)
批量创建prefab
摘要:using UnityEngine; using System.Collections; using UnityEngine.UI; using System.IO; using UnityEditor; public class Test : MonoBehaviour { public stri 阅读全文
posted @ 2016-02-15 15:46 602147629 阅读(393) 评论(0) 推荐(0)
u3d shader使用
摘要:先建立一个材质球Material 选择shader 把材质球Material 赋给图片 阅读全文
posted @ 2016-02-04 15:26 602147629 阅读(349) 评论(0) 推荐(0)
批量修改名字
摘要:using UnityEditor;using System.IO;using UnityEngine;public class SC{ [MenuItem("Assets/批量修改名字")] public static void PlacePrfab() { Object[] slecets ... 阅读全文
posted @ 2015-11-18 13:57 602147629 阅读(181) 评论(0) 推荐(0)
C#中如何只保留小数点后面两位?
摘要:string.format("%.4f",1/3)1、Math.Round(0.333333,2);//按照四舍五入的国际标准2、 double dbdata=0.335333; string str1=String.Format("{0:F}",dbdata);//默认为保留两位3、 ... 阅读全文
posted @ 2015-10-13 19:56 602147629 阅读(11309) 评论(0) 推荐(0)
Int16 Int32 Int64
摘要:数据类型占多大空间Int16, 等于short, 占2个字节. -32768 32767Int32, 等于int, 占4个字节. -2147483648 2147483647Int64, 等于long, 占8个字节. -9223372036854775808 9223372036854775807一... 阅读全文
posted @ 2015-09-28 16:07 602147629 阅读(341) 评论(0) 推荐(0)
Time.deltaTime和Time.realtimeSinceStartup
摘要:privatefloatf=0f;voidUpdate(){ f+=Time.deltaTime; Debug.LogError("Time.deltaTime-->"+f); Debug.LogError("Time.realtimeSinceStartup-->"+Time.rea... 阅读全文
posted @ 2015-09-28 15:50 602147629 阅读(1050) 评论(0) 推荐(0)
Prefabs实例化 ResourceMgr
摘要:http://www.xiaobao1993.com/886.html来源与小宝个人笔记【稍作修改】//使用 Prefabs/Resources/stone1ResourceMgr.GetInstance().CreateGameObject("stone1",image,true);using U... 阅读全文
posted @ 2015-09-02 11:26 602147629 阅读(303) 评论(0) 推荐(0)
SLua
摘要:downloaded/starcloud下载到本地的资源文件和lua文件Assets/Builds游戏资源文件存放目录Assets/Data生成的.ab文件和游戏lua文件存放目录 打包完整的.ab资源文件和lua文件生成data.zip时候用到 如果单独打包更新文件 一般直接选中Assets/Bu... 阅读全文
posted @ 2015-08-29 17:12 602147629 阅读(2610) 评论(0) 推荐(0)
判断物体是否在摄像机内
摘要:void Start(){ Rect screenRect = new Rect(0, 0, Screen.width, Screen.Height); } void Update{ Vector3 screenPos = targetCame... 阅读全文
posted @ 2015-07-20 13:13 602147629 阅读(329) 评论(0) 推荐(0)