Method GetDataAsync
GetDataAsync(CommandBuffer, Action)
Gets data from the GPU buffer into the CPU list asynchronously, via a command buffer.
Declaration
public AsyncRequestStatus GetDataAsync(CommandBuffer cmd, Action callback)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | cmd | The command buffer. Cannot be null. |
Action | callback | A callback to run when the data is ready. |
Returns
Type | Description |
---|---|
AsyncRequestStatus | The status of an asynchronous request. |
Remarks
IsEmpty must be false to call this function. Consider using the RequestAsyncReadback<T>(CommandBuffer, ExchangeBuffer<T>, Action) extension method instead. If the request fails, the callback is not called.