Version: 2022.3

TagConstraintAttribute

class in UnityEditor.ShaderKeywordFilter

切换到手册

描述

Enable or disable shader keyword filter attributes based on shader tags.

You can use TagConstraintAttribute to enable or disable filter attributes based on shader tags. For example, you can filter shader keywords differently on different scriptable render pipelines.

Use ApplyRulesIfTagsEqualAttribute and ApplyRulesIfTagsNotEqualAttribute to make your code more readable.

构造函数

TagConstraintAttributeEnable or disable shader keyword filter attributes based on shader tags.