# GetPassKeywords

> Gets the local shader keywords that are valid for a Pass within a particular shader.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## GetPassKeywords(Shader, PassIdentifier)

Gets the local shader keywords that are valid for a Pass within a particular shader.

```csharp
public static LocalKeyword[] GetPassKeywords(Shader s, in PassIdentifier passIdentifier)
```

### Parameters

**** (\[Shader]\(/engine/6000.3/script-reference/unityengine/shader)): The shader the Pass belongs to.**** (\[PassIdentifier]\(/engine/6000.3/script-reference/unityengine/rendering/passidentifier)): The identifier of a Pass within the given shader.

### Returns

| Type                                                                                      | Description                                                                                                                                                                                                                                                                              |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [LocalKeyword\[\]](/engine/6000.3/script-reference/unityengine/rendering/localkeyword.md) | Returns an array of LocalKeywords that are valid for the Pass you identify. If the [PassIdentifier](/engine/6000.3/script-reference/unityengine/rendering/passidentifier.md) you use is invalid, this function returns an empty array and Unity displays an error in the Console window. |

### Remarks

Additional Resources: [Pass](/engine/6000.3/manual/materials-and-shaders/shaders/reference/sl-reference/sl-sub-shader-pass/sl-pass.md).

## GetPassKeywords(Shader, PassIdentifier, ShaderType)

Gets the local shader keywords that are valid for a specified shader stage of a Pass within a particular shader.

```csharp
public static LocalKeyword[] GetPassKeywords(Shader s, in PassIdentifier passIdentifier, ShaderType shaderType)
```

### Parameters

**** (\[Shader]\(/engine/6000.3/script-reference/unityengine/shader)): The shader the Pass belongs to.**** (\[PassIdentifier]\(/engine/6000.3/script-reference/unityengine/rendering/passidentifier)): The identifier of a Pass within the given shader.**** (\[ShaderType]\(/engine/6000.3/script-reference/unityeditor/rendering/shadertype)): The shader stage of the given Pass.

### Returns

| Type                                                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [LocalKeyword\[\]](/engine/6000.3/script-reference/unityengine/rendering/localkeyword.md) | Returns an array of LocalKeywords that are valid for the given [shader stage](/engine/6000.3/script-reference/unityeditor/rendering/shadertype.md) of the Pass you identify. If the [PassIdentifier](/engine/6000.3/script-reference/unityengine/rendering/passidentifier.md) you use is invalid, this function returns an empty array and Unity displays an error in the Console window. If the shader stage doesn't exist in the pass, this function returns an empty array. |

### Remarks

Additional Resources: [Pass](/engine/6000.3/manual/materials-and-shaders/shaders/reference/sl-reference/sl-sub-shader-pass/sl-pass.md), [ShaderType](/engine/6000.3/script-reference/unityeditor/rendering/shadertype.md).

## GetPassKeywords(Shader, PassIdentifier, ShaderType, ShaderCompilerPlatform)

Gets the local shader keywords that are valid for a Pass within a particular shader.

```csharp
public static LocalKeyword[] GetPassKeywords(Shader s, in PassIdentifier passIdentifier, ShaderType shaderType, ShaderCompilerPlatform shaderCompilerPlatform)
```

### Parameters

**** (\[Shader]\(/engine/6000.3/script-reference/unityengine/shader)): The shader the Pass belongs to.**** (\[PassIdentifier]\(/engine/6000.3/script-reference/unityengine/rendering/passidentifier)): The identifier of a Pass within the given shader.**** (\[ShaderType]\(/engine/6000.3/script-reference/unityeditor/rendering/shadertype)): **** (\[ShaderCompilerPlatform]\(/engine/6000.3/script-reference/unityeditor/rendering/shadercompilerplatform)):&#x20;

### Returns

| Type                                                                                      | Description                                                                                                                                                                                                                                                                              |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [LocalKeyword\[\]](/engine/6000.3/script-reference/unityengine/rendering/localkeyword.md) | Returns an array of LocalKeywords that are valid for the Pass you identify. If the [PassIdentifier](/engine/6000.3/script-reference/unityengine/rendering/passidentifier.md) you use is invalid, this function returns an empty array and Unity displays an error in the Console window. |

### Remarks

Additional Resources: [Pass](/engine/6000.3/manual/materials-and-shaders/shaders/reference/sl-reference/sl-sub-shader-pass/sl-pass.md).
