摘要: ```C# private Sprite LoadSourceSprite(string relativePath) {//把资源加载到内存中UnityEngine.Object Preb = Resources.Load(relativePath, typeof(Sprite)); Sprite sprite = null; ... 阅读全文
posted @ 2020-05-20 15:59 艾孜尔江 阅读(1094) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/1991547/202005/1991547-20200519230051332-1027607585.png)![](https://img2020.cnblogs.com/blog/1991547/202005/1991547-20200519230105604-2140190295.png)![](https://im... 阅读全文
posted @ 2020-05-19 23:48 艾孜尔江 阅读(145) 评论(0) 推荐(0) 编辑
摘要: void GetChildrenAndSetActive() { Transform[] imageTargetObjects = GetComponentsInChildren<Transform>(); //注意:index=0的时候获取的是它自身,因此遍历要从1开始 for (int inde 阅读全文
posted @ 2020-05-19 17:09 艾孜尔江 阅读(2060) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CustomizedList { class M 阅读全文
posted @ 2020-05-18 22:45 艾孜尔江 阅读(1822) 评论(0) 推荐(0) 编辑
摘要: Test(5,6,7,8,9,10); void Test(int sd, params int[] arr)//不定长参数前要加params { for(int i = 0 ; i < arr.Length; i++) { Console.WriteLine(i+" "+arr[i]); } } 阅读全文
posted @ 2020-05-18 22:25 艾孜尔江 阅读(1821) 评论(0) 推荐(0) 编辑
摘要: 1. protected和private在没有继承关系的类A和类B之间其作用都可以视为式一样的——表示私有——每个类中的protected字段/属性都不能被访问到; 2. 当类与类之间存在继承关系时候,比如当class A extends B 阅读全文
posted @ 2020-05-18 20:52 艾孜尔江 阅读(1570) 评论(0) 推荐(0) 编辑
摘要: 在新建Unity项目时,Unity会默认给我们建立一个文件夹并在里面放置一个已经创建好的场景,这个场景叫做SampleScene。通常我们会将这个场景删掉或者将其重命名为Main或是其他自己项目需求的名称继续使用;在新建脚本或者新建材质的时候通常也是需要自己先去手动创建文件夹之后再去再这个文件夹内进 阅读全文
posted @ 2020-05-17 10:17 艾孜尔江 阅读(1728) 评论(0) 推荐(0) 编辑
摘要: /// <summary> ///读取StreamingAssets中的文件 /// </summary> /// <param name="path">StreamingAssets下的文件路径</param> /// <returns>读取到的字符串</returns> public stati 阅读全文
posted @ 2020-05-16 11:51 艾孜尔江 阅读(9042) 评论(0) 推荐(0) 编辑
摘要: SystemException 其他用户可处理的异常的基本类 ArgumentException 方法的参数是非法的 ArgumentNullException 一个空参数传递给方法,该方法不能接受该参数 ArgumentOutOfRangeException 参数值超出范围 ArithmeticE 阅读全文
posted @ 2020-05-15 22:24 艾孜尔江 阅读(501) 评论(0) 推荐(0) 编辑
摘要: using System; namespace UserDefinedException { class TestTemperature { static void Main(string[] args) { Temperature temp = new Temperature(); try { t 阅读全文
posted @ 2020-05-15 22:21 艾孜尔江 阅读(195) 评论(0) 推荐(0) 编辑