Version: 2023.2
언어: 한국어

ApplyRulesIfTagsEqualAttribute

class in UnityEditor.ShaderKeywordFilter

/

다음으로부터 상속:ShaderKeywordFilter.TagConstraintAttribute

매뉴얼로 전환

설명

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

If you use this attribute, Unity enables filter attributes if the shader compilation context contains matching tags.

The following example builds only variants including the FeatureA keyword, if the shader is a Universal Render Pipeline (URP) shader.

using UnityEditor.ShaderKeywordFilter;

[ShaderKeywordFilter.ApplyRulesIfTagsEqual("RenderPipeline", "UniversalPipeline")] [SelectIf(true, keywordNames: "FeatureA")] bool forceFeatureA;

Additional resources: FilterAttribute.

생성자

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

상속된 멤버