# GetTexture

> Returns a texture that corresponds to the bound named expression. If this entry is not available, or the type doesn't match, an exception is thrown.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.VFX](/engine/6000.7/script-reference/unityengine/vfx.md)
* **Assembly:** UnityEngine.VFXModule

## GetTexture(int)

Returns a texture that corresponds to the bound named expression. If this entry is not available, or the type doesn't match, an exception is thrown.

```csharp
public Texture GetTexture(int nameID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.7/script-reference/unityengine/shader/propertytoid.md).

### Returns

| Type                                                              | Description |
| ----------------------------------------------------------------- | ----------- |
| [Texture](/engine/6000.7/script-reference/unityengine/texture.md) |             |

## GetTexture(string)

Returns a texture that corresponds to the bound named expression. If this entry is not available, or the type doesn't match, an exception is thrown.

```csharp
public Texture GetTexture(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.

### Returns

| Type                                                              | Description |
| ----------------------------------------------------------------- | ----------- |
| [Texture](/engine/6000.7/script-reference/unityengine/texture.md) |             |
