Version: 2023.2
言語: 日本語

ApplyRulesIfTagsNotEqualAttribute

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 does not contain matching tags.

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

using UnityEditor.ShaderKeywordFilter;

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

Additional resources: FilterAttribute.

コンストラクタ

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

継承メンバー