namespace YooAsset.Editor
{
public class CollectCommand
{
///
/// 构建模式
///
public EBuildMode BuildMode { private set; get; }
///
/// 包裹名称
///
public string PackageName { private set; get; }
///
/// 启用可寻址资源定位
///
public bool EnableAddressable { private set; get; }
///
/// 资源定位地址大小写不敏感
///
public bool LocationToLower { private set; get; }
///
/// 包含资源GUID数据
///
public bool IncludeAssetGUID { private set; get; }
///
/// 自动收集所有着色器
///
public bool AutoCollectShaders { private set; get; }
///
/// 资源包名唯一化
///
public bool UniqueBundleName { private set; get; }
///
/// 着色器统一全名称
///
public string ShadersBundleName { private set; get; }
///
/// 忽略规则实例
///
public IIgnoreRule IgnoreRule { private set; get; }
public CollectCommand(EBuildMode buildMode, string packageName,
bool enableAddressable, bool locationToLower, bool includeAssetGUID,
bool autoCollectShaders, bool uniqueBundleName, IIgnoreRule ignoreRule)
{
BuildMode = buildMode;
PackageName = packageName;
EnableAddressable = enableAddressable;
LocationToLower = locationToLower;
IncludeAssetGUID = includeAssetGUID;
AutoCollectShaders = autoCollectShaders;
UniqueBundleName = uniqueBundleName;
IgnoreRule = ignoreRule;
// 着色器统一全名称
var packRuleResult = DefaultPackRule.CreateShadersPackRuleResult();
ShadersBundleName = packRuleResult.GetBundleName(packageName, uniqueBundleName);
}
}
}