GetData<T>(int)
Fetches the data of a successful request.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public NativeArray<T> GetData<T>(int layer = 0) where T : struct
Parameters
The index of the layer to retrieve.
Returns
Type | Description |
|---|---|
| NativeArray<T> |
Remarks
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.