示例#1
0
    // 内部构建方法
    private static void BuildInternal(BuildTarget buildTarget)
    {
        Debug.Log($"[Build] 开始构建补丁包 : {buildTarget}");

        // 打印命令行参数
        int  buildVersion = GetBuildVersion();
        bool isForceBuild = IsForceBuild();

        Debug.Log($"[Build] Version : {buildVersion}");
        Debug.Log($"[Build] 强制重建 : {isForceBuild}");

        // 创建AssetBuilder
        AssetBuilder builder = new AssetBuilder(buildTarget, buildVersion);

        // 设置配置
        builder.CompressOption          = AssetBuilder.ECompressOption.ChunkBasedCompressionLZ4;
        builder.IsForceRebuild          = isForceBuild;
        builder.IsAppendHash            = false;
        builder.IsDisableWriteTypeTree  = false;
        builder.IsIgnoreTypeTreeChanges = true;

        // 执行构建
        builder.PreAssetBuild();
        builder.PostAssetBuild();

        // 构建成功
        Debug.Log("[Build] 构建完成");
    }
示例#2
0
 /// <summary>
 /// 执行构建
 /// </summary>
 private void ExecuteBuild()
 {
     _assetBuilder.PreAssetBuild();
     _assetBuilder.PostAssetBuild();
 }