mirror of https://github.com/tuyoogame/YooAsset
update shader variant collector
parent
057ff6b22b
commit
b766df1d31
|
@ -30,17 +30,22 @@ namespace YooAsset.Editor
|
||||||
public class ShaderVariantInfo
|
public class ShaderVariantInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shader asset path in editor.
|
/// 着色器资源路径.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AssetPath;
|
public string AssetPath;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shader name.
|
/// 着色器名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ShaderName;
|
public string ShaderName;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shader variants elements list.
|
/// 着色器变种总数
|
||||||
|
/// </summary>
|
||||||
|
public int ShaderVariantCount = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 着色器变种列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ShaderVariantElement> ShaderVariantElements = new List<ShaderVariantElement>(1000);
|
public List<ShaderVariantElement> ShaderVariantElements = new List<ShaderVariantElement>(1000);
|
||||||
}
|
}
|
||||||
|
@ -71,6 +76,7 @@ namespace YooAsset.Editor
|
||||||
element.PassType = passType;
|
element.PassType = passType;
|
||||||
element.Keywords = keywords;
|
element.Keywords = keywords;
|
||||||
info.ShaderVariantElements.Add(element);
|
info.ShaderVariantElements.Add(element);
|
||||||
|
info.ShaderVariantCount++;
|
||||||
}
|
}
|
||||||
private ShaderVariantInfo GetOrCreateShaderVariantInfo(string assetPath, string shaderName)
|
private ShaderVariantInfo GetOrCreateShaderVariantInfo(string assetPath, string shaderName)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue