예제 #1
0
        static List <AssetMap.AssetObject> GetFileList(string pFullPath, bool isInSide)
        {
            List <AssetMap.AssetObject> tassetNames = new List <AssetMap.AssetObject>();

            if (!Directory.Exists(pFullPath))
            {
                return(tassetNames);
            }
            string        trepPath   = Application.dataPath;
            DirectoryInfo tdirfolder = new DirectoryInfo(pFullPath);

            FileInfo[] tfileinfos = tdirfolder.GetFiles("*.*", System.IO.SearchOption.AllDirectories);
            for (int i = 0, tmax = tfileinfos.Length; i < tmax; i++)
            {
                FileInfo tfile = tfileinfos[i];
                if (!ExportObject.IsResFile(tfile.Name))
                {
                    continue;
                }
                string tresPath = ExportObject.GetFormatPath(tfile.FullName).Replace(trepPath, "").ToLowerInvariant();
                string tfindstr = "Resources/".ToLowerInvariant();
                int    tindex   = tresPath.IndexOf(tfindstr) + tfindstr.Length;
                tresPath = tresPath.Substring(tindex, tresPath.Length - tindex);
                AssetMap.AssetObject tobj = new AssetMap.AssetObject(tresPath);
                tobj.isInSide = isInSide;
                tassetNames.Add(tobj);
                EditorUtility.DisplayProgressBar(pFullPath + "文件夹", tresPath, (float)i / tmax);
            }
            EditorUtility.ClearProgressBar();
            return(tassetNames);
        }
예제 #2
0
 static public void BuildAndroidAssetProcess(int platm)
 {
     CreatModelAsset();
     ExportSetting.Instance.sSelectedPlatm = platm;
     ExportSetting.Instance.sCompressed    = 0;
     ExportSetting.Instance.sBuildType     = 1;
     ExportObject.ExportAllBundleFullPath(ExportObject.sBuildTarget[ExportSetting.Instance.sSelectedPlatm]);
     ExportObject.MoveBUndleToStreamingPath(ExportObject.sBuildTarget[ExportSetting.Instance.sSelectedPlatm]);
 }