# FromTexture2D(Texture2D)

> Creates a background from a Texture2D.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public static Background FromTexture2D(Texture2D t)
```

### Parameters

**** (\[Texture2D]\(/engine/6000.0/script-reference/unityengine/texture2d)): The texture to use as a background.

### Returns

| Type                                                                               | Description              |
| ---------------------------------------------------------------------------------- | ------------------------ |
| [Background](/engine/6000.0/script-reference/unityengine/uielements/background.md) | A new background object. |
