void UpdateKeywords() { passes.ForEach((SCShaderPass pass) => { for (int l = 0; l < pass.keywordLines.Count; l++) { SCKeywordLine line = pass.keywordLines [l]; for (int k = 0; k < line.keywords.Count; k++) { SCKeyword keyword = line.keywords [k]; if (!keywords.Contains(keyword)) { if (SCKeywordChecker.IsValid(keyword.name)) { keywords.Add(keyword); } } } } }); enabledKeywordCount = 0; keywords.ForEach((SCKeyword kw) => { if (kw.enabled) { enabledKeywordCount++; } }); }
public void Add(SCKeywordLine keywordLine) { keywordLines.Add(keywordLine); UpdateKeywordCount(); }