Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PlatformKeywordSet

A collection of ShaderKeyword that represents a specific platform variant.
Read time 1 minuteLast updated 4 days ago

Definition

public struct PlatformKeywordSet

Remarks

A
PlatformKeywordKeywordSet
represents a part of one shader variant, a unique combination of keywords you can use to enable or disable functionality within a shader.
PlatformKeywordSet
mirrors ShaderKeywordSet's functionality, but does not contain user-defined keywords. Instead, this struct provides information on the rendering capabilities and rendering API of the target platform. For example, framebuffer fetch (represented via the keyword BuiltinShaderDefine.UNITY_FRAMEBUFFER_FETCH_AVAILABLE) may be available when compiling a shader for BuildTarget.Android, but not for BuildTarget.StandaloneWindows.
For more information on shader variants and keywords, refer to Shader variants and keywords and Changing how shaders work via branching and keywords.

Methods

Method

Description

DisableDisable a specific shader keyword.
EnableEnable a specific shader keyword.
IsEnabledCheck whether a specific shader keyword is enabled.