Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RequestAsyncReadbackIntoNativeSlice

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

Definition

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, ComputeBuffer, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<T> output, ComputeBuffer src, Action<AsyncGPUReadbackRequest> callback) where T : struct

Parameters

Reference to a NativeSlice to write the data into.

The resource to read the data from.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, ComputeBuffer, int, int, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<T> output, ComputeBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback) where T : struct

Parameters

Reference to a NativeSlice to write the data into.

The resource to read the data from.

size

The size, in bytes, of the data to retrieve from the ComputeBuffer or GraphicsBuffer.

offset

The offset in bytes in the ComputeBuffer or GraphicsBuffer.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, GraphicsBuffer, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<T> output, GraphicsBuffer src, Action<AsyncGPUReadbackRequest> callback) where T : struct

Parameters

Reference to a NativeSlice to write the data into.

The resource to read the data from.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, GraphicsBuffer, int, int, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<T> output, GraphicsBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback) where T : struct

Parameters

Reference to a NativeSlice to write the data into.

The resource to read the data from.

size

The size, in bytes, of the data to retrieve from the ComputeBuffer or GraphicsBuffer.

offset

The offset in bytes in the ComputeBuffer or GraphicsBuffer.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, Texture, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<T> output, Texture src, Action<AsyncGPUReadbackRequest> callback) where T : struct

Parameters

Reference to a NativeSlice to write the data into.

The resource to read the data from.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, Texture, int, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<T> output, Texture src, int mipIndex, Action<AsyncGPUReadbackRequest> callback) where T : struct

Parameters

Reference to a NativeSlice to write the data into.

The resource to read the data from.

mipIndex

The index of the mipmap to fetch.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, Texture, int, TextureFormat, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<T> output, Texture src, int mipIndex, TextureFormat dstFormat, Action<AsyncGPUReadbackRequest> callback) where T : struct

Parameters

Reference to a NativeSlice to write the data into.

The resource to read the data from.

mipIndex

The index of the mipmap to fetch.

dstFormat

The target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, Texture, int, GraphicsFormat, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<T> output, Texture src, int mipIndex, GraphicsFormat dstFormat, Action<AsyncGPUReadbackRequest> callback) where T : struct

Parameters

Reference to a NativeSlice to write the data into.

The resource to read the data from.

mipIndex

The index of the mipmap to fetch.

The target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, Texture, int, int, int, int, int, int, int, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<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

Reference to a NativeSlice to write the data into.

The resource to read the data from.

mipIndex

The index of the mipmap to fetch.

The starting x-coordinate, in pixels, of the Texture data to fetch.

width

The width, in pixels, of the Texture data to fetch.

The starting y-coordinate, in pixels, of the Texture data to fetch.

height

The height, in pixels, of the Texture data to fetch.

The starting z-coordinate, in pixels, of the Texture3D to fetch. For TextureCube, Texture2DArray, and TextureCubeArray, this is the index of the start layer.

depth

The depth, in pixels of the Texture3D to fetch. For TextureCube, Texture2DArray, and TextureCubeArray, this is the number of layers to retrieve.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, Texture, int, int, int, int, int, int, int, TextureFormat, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<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

Reference to a NativeSlice to write the data into.

The resource to read the data from.

mipIndex

The index of the mipmap to fetch.

The starting x-coordinate, in pixels, of the Texture data to fetch.

width

The width, in pixels, of the Texture data to fetch.

The starting y-coordinate, in pixels, of the Texture data to fetch.

height

The height, in pixels, of the Texture data to fetch.

The starting z-coordinate, in pixels, of the Texture3D to fetch. For TextureCube, Texture2DArray, and TextureCubeArray, this is the index of the start layer.

depth

The depth, in pixels of the Texture3D to fetch. For TextureCube, Texture2DArray, and TextureCubeArray, this is the number of layers to retrieve.

dstFormat

The target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

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

RequestAsyncReadbackIntoNativeSlice<T>(NativeSlice<T>, Texture, int, int, int, int, int, int, int, GraphicsFormat, Action<AsyncGPUReadbackRequest>)

Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadbackIntoNativeSlice<T>(ref NativeSlice<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

Reference to a NativeSlice to write the data into.

The resource to read the data from.

mipIndex

The index of the mipmap to fetch.

The starting x-coordinate, in pixels, of the Texture data to fetch.

width

The width, in pixels, of the Texture data to fetch.

The starting y-coordinate, in pixels, of the Texture data to fetch.

height

The height, in pixels, of the Texture data to fetch.

The starting z-coordinate, in pixels, of the Texture3D to fetch. For TextureCube, Texture2DArray, and TextureCubeArray, this is the index of the start layer.

depth

The depth, in pixels of the Texture3D to fetch. For TextureCube, Texture2DArray, and TextureCubeArray, this is the number of layers to retrieve.

The target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

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