# RequestAsync

> Retrieves data asynchronously from a GPU resource.

## Definition

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

## RequestAsync(ComputeBuffer)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(ComputeBuffer src)
```

### Parameters

**** (\[ComputeBuffer]\(/engine/6000.0/script-reference/unityengine/computebuffer)): Resource to read the data from.

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(ComputeBuffer, int, int)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(ComputeBuffer src, int size, int offset)
```

### Parameters

**** (\[ComputeBuffer]\(/engine/6000.0/script-reference/unityengine/computebuffer)): Resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Size in bytes of the data to be retrieved from the [ComputeBuffer](/engine/6000.0/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Offset in bytes in the [ComputeBuffer](/engine/6000.0/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md).

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(GraphicsBuffer)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(GraphicsBuffer src)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.0/script-reference/unityengine/graphicsbuffer)): Resource to read the data from.

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(GraphicsBuffer, int, int)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(GraphicsBuffer src, int size, int offset)
```

### Parameters

**** (\[GraphicsBuffer]\(/engine/6000.0/script-reference/unityengine/graphicsbuffer)): Resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Size in bytes of the data to be retrieved from the [ComputeBuffer](/engine/6000.0/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Offset in bytes in the [ComputeBuffer](/engine/6000.0/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md).

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(Texture, int)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex = 0)
```

### Parameters

**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): Resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the mipmap to be fetched.

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(Texture, int, TextureFormat)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, TextureFormat dstFormat)
```

### Parameters

**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): Resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the mipmap to be fetched.**** (\[TextureFormat]\(/engine/6000.0/script-reference/unityengine/textureformat)): Target [TextureFormat](/engine/6000.0/script-reference/unityengine/textureformat.md) of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(Texture, int, GraphicsFormat)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, GraphicsFormat dstFormat)
```

### Parameters

**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): Resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the mipmap to be fetched.**** (\[GraphicsFormat]\(/engine/6000.0/script-reference/unityengine/experimental/rendering/graphicsformat)): Target [TextureFormat](/engine/6000.0/script-reference/unityengine/textureformat.md) of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(Texture, int, int, int, int, int, int, int)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth)
```

### Parameters

**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): Resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the mipmap to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Starting X coordinate in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Width in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Starting Y coordinate in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Height in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth in pixels for [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth in pixels for [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(Texture, int, int, int, int, int, int, int, TextureFormat)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, TextureFormat dstFormat)
```

### Parameters

**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): Resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the mipmap to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Starting X coordinate in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Width in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Starting Y coordinate in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Height in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth in pixels for [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth in pixels for [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.**** (\[TextureFormat]\(/engine/6000.0/script-reference/unityengine/textureformat)): Target [TextureFormat](/engine/6000.0/script-reference/unityengine/textureformat.md) of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).

## RequestAsync(Texture, int, int, int, int, int, int, int, GraphicsFormat)

Retrieves data asynchronously from a GPU resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestAsync(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, GraphicsFormat dstFormat)
```

### Parameters

**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): Resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the mipmap to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Starting X coordinate in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Width in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Starting Y coordinate in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Height in pixels of the Texture data to be fetched.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth in pixels for [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Depth in pixels for [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.**** (\[GraphicsFormat]\(/engine/6000.0/script-reference/unityengine/experimental/rendering/graphicsformat)): Target [TextureFormat](/engine/6000.0/script-reference/unityengine/textureformat.md) of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

### Returns

| Type                                                                                            | Description |
| ----------------------------------------------------------------------------------------------- | ----------- |
| [Awaitable\<AsyncGPUReadbackRequest>](/engine/6000.0/script-reference/unityengine/awaitable.md) |             |

### Remarks

See [AsyncGPUReadback.Request](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/request.md).
