# GetTexture(int)

> Retrieve the texture which is currently assigned to the specified layer.

## Definition

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

```csharp
public Texture2D GetTexture(int layer = 0)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Cannot be larger than [PlatformIcon.maxLayerCount](/engine/6000.7/script-reference/unityeditor/platformicon/maxlayercount.md).

### Returns

| Type                                                                  | Description                                                                                                |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| [Texture2D](/engine/6000.7/script-reference/unityengine/texture2d.md) | The [Texture2D](/engine/6000.7/script-reference/unityengine/texture2d.md) assigned to the specified layer. |
