65 lines
2.3 KiB
C#
65 lines
2.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace CaoCao.Editor
|
|
{
|
|
[Serializable]
|
|
public class BundleSettings
|
|
{
|
|
/// <summary>
|
|
/// 对打包的数据进行混淆
|
|
/// </summary>
|
|
[Tooltip("加密资源")]
|
|
public bool encryption = true;
|
|
|
|
/// <summary>
|
|
/// 打包时先检查引用关系
|
|
/// </summary>
|
|
[Tooltip("打包时先检查引用关系")]
|
|
public bool checkReference = true;
|
|
|
|
/// <summary>
|
|
/// 保留 bundle 的名字,开启后 Bundles 目录输出的 bundle 的文件名更直观,否则文件名将只保留 hash。
|
|
/// </summary>
|
|
[Tooltip("保留bundle的名字 否则文件名将只保留 hash")]
|
|
public bool saveBundleName = true;
|
|
|
|
/// <summary>
|
|
/// 按 build 名字分割 bundle 名字,不同 build 的资源打包后会输出到不同文件夹下 当开启 saveBundleName 时有效。
|
|
/// </summary>
|
|
[Tooltip("按 build 名字分割 bundle 名字,不同 build 的资源打包后会输出到不同文件夹下 当开启 saveBundleName 时有效")]
|
|
public bool splitBundleNameWithBuild = true;
|
|
[Tooltip("是否让所有场景按文件为单位打包")]
|
|
public bool packByFileForAllScenes = true;
|
|
[Tooltip("是否让所有 Shader 打包到一起")]
|
|
public bool packTogetherForAllShaders = true;
|
|
|
|
/// <summary>
|
|
/// 是否对 AssetPack 中的资源进行二次打包
|
|
/// </summary>
|
|
[Tooltip("是否对 AssetPack 中的资源进行二次打包")]
|
|
public bool buildAssetPackAssets;
|
|
|
|
/// <summary>
|
|
/// 二次打包时,单个 pack 最大的大小
|
|
/// </summary>
|
|
[Tooltip("二次打包时,单个 pack 最大的大小")]
|
|
public ulong maxAssetPackSize = 1024 * 1024 * 20;
|
|
|
|
public string extension = ".bundle";
|
|
|
|
public List<string> shaderExtensions = new List<string>
|
|
{".shader", ".shadervariants", ".compute"};
|
|
|
|
[Tooltip("打包采集资源和依赖时需要排除的文件")]
|
|
public List<string> excludeFiles = new List<string>
|
|
{
|
|
".cs",
|
|
".cginc",
|
|
".hlsl",
|
|
".spriteatlas",
|
|
".dll",
|
|
};
|
|
}
|
|
} |