ShaderVariantCollector
ShaderVariantCollector copied to clipboard
<no keywords defined>搜集问题
if (curSnippet != null && line.StartsWith(ShaderParsedCombinations.TAG_NO_KEYWORDS_DEFINED))
{
if (curSnippet.variants != null)
{
curSnippet.variants = null;
}
}
//变体
else if (curSnippet != null && curSnippet.variants != null)
{
var keywords = keywordsSpliter(line);
if (keywords != null)
{
curSnippet.variants.Add(keywords);
}
}
// Snippet #6 platforms ffffffff:
Keywords always included into build: FOG_LINEAR FOG_EXP FOG_EXP2 INSTANCING_ON
Builtin keywords used: LIGHTPROBE_SH DYNAMICLIGHTMAP_ON SHADOWS_SHADOWMASK LIGHTMAP_ON DIRLIGHTMAP_COMBINED UNITY_HDR_ON
4 keyword variants used in scene:
<no keywords defined>
LIGHTPROBE_SH
UNITY_HDR_ON
LIGHTPROBE_SH UNITY_HDR_ON
// -----------------------------------------
这里 curSnippet.variants 会导致后面的搜集不到
,应该遇到