- 博客(8)
- 收藏
- 关注
原创 C# 特殊的引用类型string
字符串是 Unicode 字符的有序集合,用于表示文本。String 对象是System.Char 对象的有序集合,用于表示字符串。String 对象的值是该有序集合的内容,并且该值是不可变的。String 对象称为不可变的(只读),因为一旦创建了该对象,就不能修改该对象的值。看来似乎修改了String 对象的方法实际上是返回一个包含修改内容的新 String 对象。如果需要修
2014-04-28 22:33:12 887
原创 Unity 自动内存管理
了解自动内存管理When an object, string or array is created, the memory required to store it is allocated from a central pool called theheap. When the item is no longer in use, the memory it once occup
2014-04-27 19:43:15 1259
原创 Resources文件夹
The Resources class allows you to find and access Objects including assets.In the editor, Resources.FindObjectsOfTypeAll can be used to locate assets and scene objects.Assets文件夹下面可以存在多个"Resource
2014-04-25 14:43:12 5492
原创 substring indexof split replace
项目中经常用到这几个函数,就总结下:substringindexofsplitreplacesubstring 方法 str=str.substring(int beginIndex);截取掉str从首字母起长度为beginIndex的字符串,将剩余字符串赋值给str;str=str.substring(int beginIndex,int endIndex);
2014-04-24 15:43:19 859
原创 在运行时脚本中使用UnityEditor命名空间
在运行时脚本中使用UnityEditor命名空间,假如该脚本被挂在场景中的物体上,那么:可以这样做,在Unity编辑器中运行时也会正常运行,不会报错。但是当我们打包时会出现以下错误(如果该脚本没有被挂在任何一个脚本上,那么打包时不会包含该脚本,就不会出错):The typeor namespacename `UnityEditor'could not be found. A
2014-04-09 08:56:58 6391 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人