Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RequestAsyncReadback

Adds an asynchonous GPU readback request command to the command buffer.
Read time 7 minutesLast updated 4 days ago

Definition

RequestAsyncReadback(ComputeBuffer, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(ComputeBuffer src, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(GraphicsBuffer, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(GraphicsBuffer src, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(ComputeBuffer, int, int, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(ComputeBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

size

Size in bytes of the data to be retrieved from the ComputeBuffer or GraphicsBuffer.

offset

Offset in bytes in the ComputeBuffer or GraphicsBuffer.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(GraphicsBuffer, int, int, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(GraphicsBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

size

Size in bytes of the data to be retrieved from the ComputeBuffer or GraphicsBuffer.

offset

Offset in bytes in the ComputeBuffer or GraphicsBuffer.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(Texture, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(Texture, int, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

mipIndex

The index of the mipmap to be fetched.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(Texture, int, TextureFormat, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, TextureFormat dstFormat, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

mipIndex

The index of the mipmap to be fetched.

dstFormat

The target TextureFormat of the data. Conversion will happen automatically if format is different from the format stored on GPU.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(Texture, int, GraphicsFormat, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, GraphicsFormat dstFormat, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

mipIndex

The index of the mipmap to be fetched.

The target TextureFormat of the data. Conversion will happen automatically if format is different from the format stored on GPU.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(Texture, int, int, int, int, int, int, int, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

mipIndex

The index of the mipmap to be fetched.

Starting X coordinate in pixels of the Texture data to be fetched.

width

Width in pixels of the Texture data to be fetched.

Starting Y coordinate in pixels of the Texture data to be fetched.

height

Height in pixels of the Texture data to be fetched.

Start Z coordinate in pixels for the Texture3D being fetched. Index of Start layer for TextureCube, Texture2DArray and TextureCubeArray being fetched.

depth

Depth in pixels for Texture3D being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(Texture, int, int, int, int, int, int, int, TextureFormat, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, TextureFormat dstFormat, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

mipIndex

The index of the mipmap to be fetched.

Starting X coordinate in pixels of the Texture data to be fetched.

width

Width in pixels of the Texture data to be fetched.

Starting Y coordinate in pixels of the Texture data to be fetched.

height

Height in pixels of the Texture data to be fetched.

Start Z coordinate in pixels for the Texture3D being fetched. Index of Start layer for TextureCube, Texture2DArray and TextureCubeArray being fetched.

depth

Depth in pixels for Texture3D being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.

dstFormat

The target TextureFormat of the data. Conversion will happen automatically if format is different from the format stored on GPU.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.

RequestAsyncReadback(Texture, int, int, int, int, int, int, int, GraphicsFormat, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, GraphicsFormat dstFormat, Action<AsyncGPUReadbackRequest> callback)

Parameters

The resource to read the data from.

mipIndex

The index of the mipmap to be fetched.

Starting X coordinate in pixels of the Texture data to be fetched.

width

Width in pixels of the Texture data to be fetched.

Starting Y coordinate in pixels of the Texture data to be fetched.

height

Height in pixels of the Texture data to be fetched.

Start Z coordinate in pixels for the Texture3D being fetched. Index of Start layer for TextureCube, Texture2DArray and TextureCubeArray being fetched.

depth

Depth in pixels for Texture3D being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.

The target TextureFormat of the data. Conversion will happen automatically if format is different from the format stored on GPU.

A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.

Remarks

Additional Resources: AsyncGPUReadback.Request.