Exemple #1
0
    string[] GetDepends()
    {
        //依赖Assets下的DLL
        var assetDir = Application.dataPath;
        var dllList0 = Directory.GetFiles(assetDir, "*.dll", SearchOption.AllDirectories);
        //依赖Library/ScriptAssemblies下的DLL
        var projectDir = Directory.GetParent(assetDir).FullName;
        var dllList1   = Directory.GetFiles(FileTool.CombineDirs(true, projectDir, "Library", "ScriptAssemblies"), "*.dll", SearchOption.AllDirectories);
        //依赖Unity安装目录下的DLL
        var           dir      = FileTool.CombineDirs(true, EditorApplication.applicationContentsPath, "Managed", "UnityEngine");
        var           dllList2 = Directory.GetFiles(dir, "*.dll", SearchOption.AllDirectories);
        List <string> list0    = new List <string>(dllList0);

        for (int i = 0; i < list0.Count; i++)
        {
            if (list0[i].Contains("sqlite3.dll") || list0[i].Contains(LWUtility.HotfixFileName))
            {
                list0.RemoveAt(i);
                i--;
            }
        }
        List <string> list1 = new List <string>(dllList1);
        List <string> list2 = new List <string>(dllList2);

        list1.AddRange(list2);
        list1.AddRange(list0);
        return(list1.ToArray());
    }