Ejemplo n.º 1
0
        public static void ForceClear()
        {
            IOUtils.DeleteDirIfExists(QResSystemMark.AssetBundlesOutputPath);
            IOUtils.DeleteDirIfExists(Application.streamingAssetsPath + "/AssetBundles");

            AssetDatabase.Refresh();
        }
Ejemplo n.º 2
0
        public static void BuildAssetBundles(BuildTarget buildTarget, string inputProjectTag)
        {
            if (string.IsNullOrEmpty(inputProjectTag))
            {
                projectTag = "qframework";
            }
            else
            {
                projectTag = inputProjectTag;
            }
            SetProjectTag();

            // Choose the output path according to the build target.
            string outputPath = Path.Combine(QAssetBundleTool.AssetBundlesOutputPath, GetPlatformName());

            outputPath = outputPath + "/" + projectTag;

            if (!Directory.Exists(outputPath))
            {
                Directory.CreateDirectory(outputPath);
            }

            BuildPipeline.BuildAssetBundles(outputPath, BuildAssetBundleOptions.ChunkBasedCompression, buildTarget);

            List <string> finalzips  = PackZips(outputPath);
            List <string> finalFiles = PackPTFiles(outputPath);

            GenerateVersionConfig(outputPath, finalzips, finalFiles);

            string finalDir = Application.streamingAssetsPath + "/AssetBundles/" + GetPlatformName() + "/" + projectTag;

            IOUtils.DeleteDirIfExists(finalDir);
            IOUtils.CreateDirIfNotExists(finalDir);
            FileUtil.ReplaceDirectory(outputPath, finalDir);
            AssetDatabase.Refresh();
            // TODO: 欧阳Framework支持
            AssetBundleExporter.BuildDataTable();
        }
Ejemplo n.º 3
0
 public static void ForceClear()
 {
     IOUtils.DeleteDirIfExists(ABEditorPathConfig.AssetBundleOutputPath);
     IOUtils.DeleteDirIfExists(Application.streamingAssetsPath + "/AssetBundles");
     AssetDatabase.Refresh();
 }