浏览代码

No need for a foreach to remove keywords on a shader

/Yibing-Project-2
Frédéric Vauchelles 7 年前
当前提交
601100f9
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 3
      ScriptableRenderPipeline/HDRenderPipeline/Editor/HDEditorUtils.cs

3
ScriptableRenderPipeline/HDRenderPipeline/Editor/HDEditorUtils.cs


public static void RemoveMaterialKeywords(Material material)
{
foreach (var keyword in material.shaderKeywords)
material.DisableKeyword(keyword);
material.shaderKeywords = null;
}
}
}
正在加载...
取消
保存