Experimental: this API is experimental and might be changed or removed in the future.

AsyncGPUReadbackRequest.GetData

Cambiar al Manual
public NativeArray<T> GetData (int layer);

Parámetros

layerThe index of the layer to retrieve.

Descripción

Fetches the data of a successful request.

This method throws an InvalidOperationException if called when the request has not been fulfilled or has been disposed of. If the request is still pending then calling AsyncGPUReadbackRequest.done on this request will return false. In the case of a request not completing successfully, or if it has been disposed of then calling AsyncGPUReadbackRequest.hasError on this request will return true. Layer index allows you to access the different request slices of a Texture3D,TextureCube,Texture2DArray and TextureCubeArray.