# RequestIntoNativeArrayAsync

> Retrieves data asynchronously from a GPU Graphics Buffer resource.

## Definition

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

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, ComputeBuffer)

Retrieves data asynchronously from a GPU Graphics Buffer resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, ComputeBuffer src) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[ComputeBuffer]\(/engine/6000.0/script-reference/unityengine/computebuffer)): The [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md) to read the data from.

### Returns

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

### Remarks

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

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, ComputeBuffer, int, int)

Retrieves data asynchronously from a GPU Graphics Buffer resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, ComputeBuffer src, int size, int offset) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[ComputeBuffer]\(/engine/6000.0/script-reference/unityengine/computebuffer)): The [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md) to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The size, in bytes, of the data to retrieve from the [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Offset in bytes in the [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.RequestIntoNativeArray](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, GraphicsBuffer)

Retrieves data asynchronously from a GPU Graphics Buffer resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, GraphicsBuffer src) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[GraphicsBuffer]\(/engine/6000.0/script-reference/unityengine/graphicsbuffer)): The [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md) to read the data from.

### Returns

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

### Remarks

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

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, GraphicsBuffer, int, int)

Retrieves data asynchronously from a GPU Graphics Buffer resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, GraphicsBuffer src, int size, int offset) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[GraphicsBuffer]\(/engine/6000.0/script-reference/unityengine/graphicsbuffer)): The [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md) to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The size, in bytes, of the data to retrieve from the [GraphicsBuffer](/engine/6000.0/script-reference/unityengine/graphicsbuffer.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Offset in bytes in the [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.RequestIntoNativeArray](/engine/6000.0/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, Texture, int)

Retrieves data asynchronously from a GPU Texture resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, Texture src, int mipIndex = 0) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): The [Texture](/engine/6000.0/script-reference/unityengine/texture.md) resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the mipmap to fetch.

### Returns

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

### Remarks

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

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, Texture, int, TextureFormat)

Retrieves data asynchronously from a GPU Texture resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, Texture src, int mipIndex, TextureFormat dstFormat) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): The [Texture](/engine/6000.0/script-reference/unityengine/texture.md) resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the mipmap to fetch.**** (\[TextureFormat]\(/engine/6000.0/script-reference/unityengine/textureformat)): The target [TextureFormat](/engine/6000.0/script-reference/unityengine/textureformat.md) of the data. Conversion happens automatically if this format is different from the format stored on the GPU.

### Returns

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

### Remarks

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

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, Texture, int, GraphicsFormat)

Retrieves data asynchronously from a GPU Texture resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, Texture src, int mipIndex, GraphicsFormat dstFormat) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): The [Texture](/engine/6000.0/script-reference/unityengine/texture.md) resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the mipmap to fetch.**** (\[GraphicsFormat]\(/engine/6000.0/script-reference/unityengine/experimental/rendering/graphicsformat)): The target [TextureFormat](/engine/6000.0/script-reference/unityengine/textureformat.md) of the data. Conversion happens automatically if this format is different from the format stored on the GPU.

### Returns

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

### Remarks

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

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, Texture, int, int, int, int, int, int, int, TextureFormat)

Retrieves data asynchronously from a GPU Texture resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, TextureFormat dstFormat) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): The [Texture](/engine/6000.0/script-reference/unityengine/texture.md) resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the mipmap to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The starting x-coordinate, in pixels, of the Texture data to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The width, in pixels, of the Texture data to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The starting y-coordinate, in pixels, of the Texture data to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The height, in pixels, of the Texture data to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The starting z-coordinate, in pixels, of the [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.0/script-reference/unityengine/texture2darray.md), and TextureCubeArray, this is the index of the start layer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The depth, in pixels of the [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.0/script-reference/unityengine/texture2darray.md), and TextureCubeArray, this is the number of layers to retrieve.**** (\[TextureFormat]\(/engine/6000.0/script-reference/unityengine/textureformat)): The target [TextureFormat](/engine/6000.0/script-reference/unityengine/textureformat.md) of the data. Conversion happens automatically if this format is different from the format stored on the GPU.

### Returns

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

### Remarks

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

## RequestIntoNativeArrayAsync\<T>(NativeArray\<T>, Texture, int, int, int, int, int, int, int, GraphicsFormat)

Retrieves data asynchronously from a GPU Texture resource.

```csharp
public static Awaitable<AsyncGPUReadbackRequest> RequestIntoNativeArrayAsync<T>(ref NativeArray<T> output, Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, GraphicsFormat dstFormat) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): Reference to the NativeArray to write the data into. The NativeArray or underlying memory cannot be Disposed until the request is complete.**** (\[Texture]\(/engine/6000.0/script-reference/unityengine/texture)): The [Texture](/engine/6000.0/script-reference/unityengine/texture.md) resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the mipmap to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The starting x-coordinate, in pixels, of the Texture data to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The width, in pixels, of the Texture data to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The starting y-coordinate, in pixels, of the Texture data to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The height, in pixels, of the Texture data to fetch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The starting z-coordinate, in pixels, of the [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.0/script-reference/unityengine/texture2darray.md), and TextureCubeArray, this is the index of the start layer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The depth, in pixels of the [Texture3D](/engine/6000.0/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.0/script-reference/unityengine/texture2darray.md), and TextureCubeArray, this is the number of layers to retrieve.**** (\[GraphicsFormat]\(/engine/6000.0/script-reference/unityengine/experimental/rendering/graphicsformat)): The target [TextureFormat](/engine/6000.0/script-reference/unityengine/textureformat.md) of the data. Conversion happens automatically if this format is different from the format stored on the GPU.

### Returns

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

### Remarks

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