TheInitialProject/Assets/CaoCao/Scripts/Editor/XAsset/Build/Config/BuildGroup.cs
2024-10-23 16:59:02 +08:00

42 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using CaoCao.XAsset;
using UnityEngine;
namespace CaoCao.Editor
{
public enum BundleMode
{
PackTogether,
PackByEntry,
PackByFile,
PackByFolder,
PackByTopSubFolder,
PackByRaw,
PackByCustom
}
[CreateAssetMenu(menuName = "CaoCao/XAsset/" + nameof(BuildGroup), fileName = nameof(BuildGroup))]
public class BuildGroup : ScriptableObject
{
[Tooltip("打包模式: 游戏运行时生命周期相同(同时加载同时回收)的资源应该尽量用一个相同的名字打包到一起 \n" +
"PackTogether: 所有采集到的资源都按分组名字打包 \n" +
"PackByEntry: 按分组的 Entries 中的 Entry 的名字打包 \n" +
"PackByFile: 每个文件都会被打包到一个独立的包中 \n" +
"PackByFolder: 按文件夹为单位打包 \n" +
"PackByTopSubFolder: 按分组的 Entries 中每一个 Entry 的顶层子文件夹打包,子文件夹和顶层子文件夹共享一个打包分组 \n" +
"PackByRaw: 按原始格式打包,不打包 AssetBundle但是参与版本更新 \n" +
"PackByCustom: 按自定义包名的返回打包,如果没有实现默认按文件打包 \n")]
public BundleMode bundleMode = BundleMode.PackByFile;
[Tooltip("寻址模式: \n" +
"LoadByPath: 按 Assets 路径加载,始终有效 \n" +
"LoadByName: 按 文件名 加载 \n" +
"LoadByNameWithoutExtension: 按 不带扩张名的文件名 加载 \n" +
"LoadByDependencies: 按 依赖 加载 \n")]
public AddressMode addressMode = AddressMode.LoadByPath;
[Tooltip("需要打包的资源节点,可以包含文件或文件夹,可以批量拖拽选中对象赋值。")]
public Object[] entries;
[Tooltip("可以针对资源节点进行筛选")]
public string filter;
public string build { get; set; }
}
}