# RequestAsyncReadbackIntoNativeArray

> Adds an asynchonous GPU readback request command to the command buffer.

## Definition

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

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, ComputeBuffer, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, ComputeBuffer src, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[ComputeBuffer]\(/engine/6000.6/script-reference/unityengine/computebuffer)): The resource to read the data from.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, ComputeBuffer, int, int, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, ComputeBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[ComputeBuffer]\(/engine/6000.6/script-reference/unityengine/computebuffer)): The resource 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 [ComputeBuffer](/engine/6000.6/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.6/script-reference/unityengine/graphicsbuffer.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The offset in bytes in the [ComputeBuffer](/engine/6000.6/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.6/script-reference/unityengine/graphicsbuffer.md).**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, GraphicsBuffer, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, GraphicsBuffer src, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[GraphicsBuffer]\(/engine/6000.6/script-reference/unityengine/graphicsbuffer)): The resource to read the data from.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, GraphicsBuffer, int, int, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, GraphicsBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[GraphicsBuffer]\(/engine/6000.6/script-reference/unityengine/graphicsbuffer)): The resource 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 [ComputeBuffer](/engine/6000.6/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.6/script-reference/unityengine/graphicsbuffer.md).**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The offset in bytes in the [ComputeBuffer](/engine/6000.6/script-reference/unityengine/computebuffer.md) or [GraphicsBuffer](/engine/6000.6/script-reference/unityengine/graphicsbuffer.md).**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, Texture, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, Texture src, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): The resource to read the data from.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, Texture, int, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, Texture src, int mipIndex, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): The resource to read the data from.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the mipmap to fetch.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, Texture, int, TextureFormat, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, Texture src, int mipIndex, TextureFormat dstFormat, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): The 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.6/script-reference/unityengine/textureformat)): The target [TextureFormat](/engine/6000.6/script-reference/unityengine/textureformat.md) of the data. Conversion happens automatically if this format is different from the format stored on the GPU.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, Texture, int, GraphicsFormat, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, Texture src, int mipIndex, GraphicsFormat dstFormat, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): The 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.6/script-reference/unityengine/experimental/rendering/graphicsformat)): The target [TextureFormat](/engine/6000.6/script-reference/unityengine/textureformat.md) of the data. Conversion happens automatically if this format is different from the format stored on the GPU.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, Texture, int, int, int, int, int, int, int, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

```csharp
public void RequestAsyncReadbackIntoNativeArray<T>(ref NativeArray<T> output, Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, Action<AsyncGPUReadbackRequest> callback) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): The 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.6/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.6/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.6/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.6/script-reference/unityengine/texture2darray.md), and TextureCubeArray, this is the number of layers to retrieve.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, Texture, int, int, int, int, int, int, int, TextureFormat, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

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

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): The 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.6/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.6/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.6/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.6/script-reference/unityengine/texture2darray.md), and TextureCubeArray, this is the number of layers to retrieve.**** (\[TextureFormat]\(/engine/6000.6/script-reference/unityengine/textureformat)): The target [TextureFormat](/engine/6000.6/script-reference/unityengine/textureformat.md) of the data. Conversion happens automatically if this format is different from the format stored on the GPU.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).

## RequestAsyncReadbackIntoNativeArray\<T>(NativeArray\<T>, Texture, int, int, int, int, int, int, int, GraphicsFormat, Action\<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.

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

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.6/script-reference/unity/collections/nativearray1)): Reference to a NativeArray to write the data into.**** (\[Texture]\(/engine/6000.6/script-reference/unityengine/texture)): The 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.6/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.6/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.6/script-reference/unityengine/texture3d.md) to fetch. For TextureCube, [Texture2DArray](/engine/6000.6/script-reference/unityengine/texture2darray.md), and TextureCubeArray, this is the number of layers to retrieve.**** (\[GraphicsFormat]\(/engine/6000.6/script-reference/unityengine/experimental/rendering/graphicsformat)): The target [TextureFormat](/engine/6000.6/script-reference/unityengine/textureformat.md) of the data. Conversion happens automatically if this format is different from the format stored on the GPU.**** (\[Action\<AsyncGPUReadbackRequest>]\(https\://learn.microsoft.com/dotnet/api/system.action)): A delegate Action to call after Unity completes the request. When Unity calls the delegate, it passes the completed request as a parameter to the Action.

### Remarks

Additional Resources: [AsyncGPUReadback.RequestIntoNativeArray](/engine/6000.6/script-reference/unityengine/rendering/asyncgpureadback/requestintonativearray.md).
