如果数据字段不符合条件,则从构建中删除指定的着色器关键字。
如果 RemoveIf 下的数据字段不匹配 condition 的值,Unity 会在任何 multi_compile 关键字集中删除 keywordNames。
using UnityEditor.ShaderKeywordFilter;
[RemoveIfNot(true, keywordNames: "FeatureA")] bool enableFeatureA;
其他资源: FilterAttribute.
| RemoveIfNotAttribute | 如果数据字段不符合条件,则从构建中删除指定的着色器关键字。 |