public static void ForceClear() { IOUtils.DeleteDirIfExists(QResSystemMark.AssetBundlesOutputPath); IOUtils.DeleteDirIfExists(Application.streamingAssetsPath + "/AssetBundles"); AssetDatabase.Refresh(); }
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(); }
public static void ForceClear() { IOUtils.DeleteDirIfExists(ABEditorPathConfig.AssetBundleOutputPath); IOUtils.DeleteDirIfExists(Application.streamingAssetsPath + "/AssetBundles"); AssetDatabase.Refresh(); }