feat : add shader pack rule and filter rule

pull/252/head
hevinci 2024-03-08 11:38:29 +08:00
parent 81747462b1
commit fadc8e6fd6
2 changed files with 21 additions and 0 deletions

View File

@ -70,6 +70,15 @@ namespace YooAsset.Editor
}
}
[DisplayName("收集着色器")]
public class CollectShader : IFilterRule
{
public bool IsCollectAsset(FilterRuleData data)
{
return Path.GetExtension(data.AssetPath) == ".shader";
}
}
[DisplayName("收集着色器变种集合")]
public class CollectShaderVariants : IFilterRule
{

View File

@ -147,6 +147,18 @@ namespace YooAsset.Editor
}
}
/// <summary>
/// 打包着色器
/// </summary>
[DisplayName("打包着色器文件")]
public class PackShader : IPackRule
{
public PackRuleResult GetPackRuleResult(PackRuleData data)
{
return DefaultPackRule.CreateShadersPackRuleResult();
}
}
/// <summary>
/// 打包着色器变种集合
/// </summary>