# GraphicsTexture

> Represents the view on a single texture resource that is uploaded to the graphics device.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.Rendering](/engine/6000.5/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule
* **Implements:** [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public class GraphicsTexture : IDisposable
```

## Remarks

A GraphicsTexture specifically represents the actual resource that a [Texture](/engine/6000.5/script-reference/unityengine/texture.md) object uploads to the GPU. A Texture may create several different GraphicsTextures in its lifetime (such as to represent different mipmap levels or the color and depth buffers in a [RenderTexture](/engine/6000.5/script-reference/unityengine/rendertexture.md)) and will recreate GraphicsTextures when certain changes are made to the Texture (such as resizing). Use [Texture.graphicsTexture](/engine/6000.5/script-reference/unityengine/texture/graphicstexture.md) to get a Texture's current GraphicsTexture.

GraphicsTextures are useful for getting the current uploaded state of a texture on the graphics device. [GraphicsTextureDescriptor.mipCount](/engine/6000.5/script-reference/unityengine/rendering/graphicstexturedescriptor/mipcount.md) represents only the uploaded mipmap levels when using texture streaming or [mipmap limit settings](/engine/6000.5/script-reference/unityengine/texture2d/activemipmaplimit.md). Consequently, [GraphicsTextureDescriptor.width](/engine/6000.5/script-reference/unityengine/rendering/graphicstexturedescriptor/width.md) and [GraphicsTextureDescriptor.height](/engine/6000.5/script-reference/unityengine/rendering/graphicstexturedescriptor/height.md) represent the width and height of the maximum uploaded mipmap level.

GraphicsTextures are purely run-time objects and cannot be saved as assets.

To use a GraphicsTexture as a render target, it must have [GraphicsTextureDescriptorFlags.RenderTarget](/engine/6000.5/script-reference/unityengine/rendering/graphicstexturedescriptorflags/rendertarget.md) enabled in its [GraphicsTextureDescriptor.flags](/engine/6000.5/script-reference/unityengine/rendering/graphicstexturedescriptor/flags.md).

Additional Resources: [Texture.graphicsTexture](/engine/6000.5/script-reference/unityengine/texture/graphicstexture.md), [Graphics.SetRenderTarget](/engine/6000.5/script-reference/unityengine/graphics/setrendertarget.md).

## Properties

| Property                                                                                          | Description                                                          |
| ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [descriptor](/engine/6000.5/script-reference/unityengine/rendering/graphicstexture/descriptor.md) | Contains all the information Unity uses to create a GraphicsTexture. |
| [state](/engine/6000.5/script-reference/unityengine/rendering/graphicstexture/state.md)           | The current state of a GraphicsTexture.                              |

## Static Properties

| Property                                                                                  | Description                        |
| ----------------------------------------------------------------------------------------- | ---------------------------------- |
| [active](/engine/6000.5/script-reference/unityengine/rendering/graphicstexture/active.md) | Currently active graphics texture. |
