# GetTexture

> Get a texture from the property block.

## Definition

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

## GetTexture(string)

Get a texture from the property block.

```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.6/script-reference/unityengine/texture.md) |             |

### Remarks

Returns null if not found.

## GetTexture(int)

Get a texture from the property block.

```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.6/script-reference/unityengine/shader/propertytoid.md).

### Returns

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

### Remarks

Returns null if not found.
