# GetKeywordName

> Gets the string name of the keyword.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.0/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## GetKeywordName(Shader, ShaderKeyword)

Gets the string name of the keyword.

> **Warning:**
>
> **Deprecated.** GetKeywordName is deprecated. Use the ShaderKeyword.name property instead.

```csharp
public static string GetKeywordName(Shader shader, ShaderKeyword index)
```

### Parameters

**** (\[Shader]\(/engine/6000.0/script-reference/unityengine/shader)): **** (\[ShaderKeyword]\(/engine/6000.0/script-reference/unityengine/rendering/shaderkeyword)):&#x20;

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### Remarks

Unity now provides the [ShaderKeyword.name](/engine/6000.0/script-reference/unityengine/rendering/shaderkeyword/name.md) API which works with all shader keyword types. It is best practice to use this API instead.

## GetKeywordName(ComputeShader, ShaderKeyword)

Gets the string name of the keyword.

> **Warning:**
>
> **Deprecated.** GetKeywordName is deprecated. Use the ShaderKeyword.name property instead.

```csharp
public static string GetKeywordName(ComputeShader shader, ShaderKeyword index)
```

### Parameters

**** (\[ComputeShader]\(/engine/6000.0/script-reference/unityengine/computeshader)): **** (\[ShaderKeyword]\(/engine/6000.0/script-reference/unityengine/rendering/shaderkeyword)):&#x20;

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### Remarks

Unity now provides the [ShaderKeyword.name](/engine/6000.0/script-reference/unityengine/rendering/shaderkeyword/name.md) API which works with all shader keyword types. It is best practice to use this API instead.

## GetKeywordName()

Gets the string name of the keyword.

> **Warning:**
>
> **Deprecated.** GetKeywordName is deprecated. Use ShaderKeyword.name instead.

```csharp
public string GetKeywordName()
```

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### Remarks

Unity now provides the [ShaderKeyword.name](/engine/6000.0/script-reference/unityengine/rendering/shaderkeyword/name.md) API which works with all shader keyword types. It is best practice to use this API instead.
