# 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.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **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.

```csharp
public static BuiltinShaderDefine[] GetShaderPlatformKeywordsForBuildTarget(ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, GraphicsTier tier)
```

### Parameters

**** (\[ShaderCompilerPlatform]\(/engine/6000.3/script-reference/unityeditor/rendering/shadercompilerplatform)): The shader compiler platform.**** (\[BuildTarget]\(/engine/6000.3/script-reference/unityeditor/buildtarget)): The build target.**** (\[GraphicsTier]\(/engine/6000.3/script-reference/unityengine/rendering/graphicstier)): An optional graphics tier.

### Returns

| Type                                                                                                    | Description                                                                                  |
| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [BuiltinShaderDefine\[\]](/engine/6000.3/script-reference/unityengine/rendering/builtinshaderdefine.md) | 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.

```csharp
public static BuiltinShaderDefine[] GetShaderPlatformKeywordsForBuildTarget(ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget)
```

### Parameters

**** (\[ShaderCompilerPlatform]\(/engine/6000.3/script-reference/unityeditor/rendering/shadercompilerplatform)): The shader compiler platform.**** (\[BuildTarget]\(/engine/6000.3/script-reference/unityeditor/buildtarget)): The build target.

### Returns

| Type                                                                                                    | Description                                                                                  |
| ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [BuiltinShaderDefine\[\]](/engine/6000.3/script-reference/unityengine/rendering/builtinshaderdefine.md) | Returns an array of built-in shader defines needed to compile a shader for the given target. |
