摘要:
public class Test3 : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler { // Start is called before the first frame update void Start() { } // Upd 阅读全文
摘要:
读取固定后缀名文件: public static string ReadFile(string path, string extenStr) { DirectoryInfo root = new DirectoryInfo(path); FileInfo[] files = root.GetFile 阅读全文
摘要:
方法1:直接拖曳scence场景中的对象到变量 方法2:GameObject.Find("名称路径"); 缺点:查找路径中如果有一个对象是未被激活,那么目标物体就无法被查找到 方法3:transformFind("根据父物体找子物体"); 不论路劲物体有无隐藏 ,均可以找到目标物体 方法4:Game 阅读全文
摘要:
//打包 static void AssetsBuild() { Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets); if (selection.Length <= 0) retu 阅读全文
摘要:
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Test7 : MonoBehaviour { public GameObject go; // Start is 阅读全文
摘要:
紧紧需要修改web。config文件中的错误即可,如下图参数 将其中的数字6改为 提示中的 2,3,4,5即可 阅读全文
摘要:
string str="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; public void CreateRandomCode() { char[] chars=str.ToCharArray(); StringBuilder strRan = new StringB 阅读全文
摘要:
void Start() { T1 t = Resources.Load<T1>("infor"); //infor必须放在resources下 print(t.a); print(t.b); T1 t2= AssetDatabase.LoadAssetAtPath<T1>("Assets/info 阅读全文
摘要:
[CanEditMultipleObjects] 选择多个对象,多个对象上共同的组件属性可以编辑 [ExecuteInEditMode] 让该类的方法可以在编辑模式下直接运行 阅读全文
摘要:
如图 sqReader.Read()函数只能执行一次在using中为真,执行完成之后即可为假,多执行的话 while函数进不去 。无法追踪具体代码 阅读全文