三国卡牌客户端基础资源仓库
yyl
4 天以前 44aa57b4c4ef257fc79b7ecb78c5acbf97b1388c
update流程

(cherry picked from commit bf2e88fc85e4e10ae60fad7635bbe6e91375e09a)
1个文件已修改
30 ■■■■■ 已修改文件
Assets/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
@@ -256,6 +256,8 @@
            VersionConfig.Copy(fromVersionConfig, versionConfig);
            EditorUtility.SetDirty(versionConfig);
            ExportVersionConfigEx.Export();
        }
        public void OnGUI(Rect pos)
@@ -592,15 +594,43 @@
        private void ExecuteBuildAll()
        {
            ExportVersionConfigEx.Export();
            // 使用 YooAsset 全量打包所有 Package(含 HybridCLR)
            if (!YooAssetBuildTool.BuildAllPackagesCore(incremental: false, m_UserData.m_OutputPath))
            {
                Debug.LogError("[AssetBundleBuildTab] YooAsset 全量打包失败!");
                return;
            }
            string outputYooPath = Path.Combine(GetResolvedOutputPath(), "yoo");
            string sourcePath = Path.Combine(outputYooPath, "Builtin");
            string destinationPath = Path.Combine(outputYooPath, "StreamingAssets", "yoo");
            if (!CopyBuiltinDirectory(sourcePath, destinationPath))
            {
                Debug.LogError("[AssetBundleBuildTab] Builtin 拷贝到 m_OutputPath/yoo/StreamingAssets/yoo 失败!");
                return;
            }
            Debug.Log("[AssetBundleBuildTab] YooAsset 全量打包完成。");
        }
        public static bool CopyBuiltinDirectory(string sourcePath, string destinationPath)
        {
            if (!Directory.Exists(sourcePath))
            {
                Debug.LogError($"[AssetBundleBuildTab] Builtin 源目录不存在: {sourcePath}");
                return false;
            }
            if (Directory.Exists(destinationPath))
                Directory.Delete(destinationPath, true);
            DirectoryCopy(sourcePath, destinationPath);
            Debug.Log($"[AssetBundleBuildTab] 已复制 Builtin 到: {destinationPath}");
            return true;
        }
        private void ExecuteCopyToLocalCDN()
        {
            YooAssetBuildTool.CopyBuildOutputToLocalCDNFlat();