Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetShaderPlatformKeywordsForBuildTarget

Gets the platform keywords for a shader, given a shader compiler platform, build target, and optional graphics tier. These platform keywords are necessary to properly compile a shader for a given target.
Read time 1 minuteLast updated 8 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

GetShaderPlatformKeywordsForBuildTarget(ShaderCompilerPlatform, BuildTarget, GraphicsTier)

Gets the platform keywords for a shader, given a shader compiler platform, build target, and optional graphics tier. These platform keywords are necessary to properly compile a shader for a given target.
public static BuiltinShaderDefine[] GetShaderPlatformKeywordsForBuildTarget(ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, GraphicsTier tier)

Parameters

shaderCompilerPlatform

The shader compiler platform.

buildTarget

The build target.

An optional graphics tier.

Returns

Type

Description

BuiltinShaderDefine[]Returns an array of built-in shader defines needed to compile a shader for the given target.

GetShaderPlatformKeywordsForBuildTarget(ShaderCompilerPlatform, BuildTarget)

Gets the platform keywords for a shader, given a shader compiler platform, build target, and optional graphics tier. These platform keywords are necessary to properly compile a shader for a given target.
public static BuiltinShaderDefine[] GetShaderPlatformKeywordsForBuildTarget(ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget)

Parameters

shaderCompilerPlatform

The shader compiler platform.

buildTarget

The build target.

Returns

Type

Description

BuiltinShaderDefine[]Returns an array of built-in shader defines needed to compile a shader for the given target.