# GetBytesReadArray()

> Returns an array containing the number of bytes read by the ReadCommand operations during the asynchronous file read request, where each index corresponds to the ReadCommand index.

## Definition

* **Type:** Method
* **Namespace:** [Unity.IO.LowLevel.Unsafe](/engine/6000.5/script-reference/unity/io/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public ulong* GetBytesReadArray()
```

### Returns

| Type                                                            | Description                                                                                          |
| --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [ulong\*](https://learn.microsoft.com/dotnet/api/system.uint64) | An unsafe pointer to the array storing the number of bytes read for each ReadCommand in the request. |

### Remarks

It is not safe to retain the pointer after the ReadHandle has been disposed, as it will have been freed internally.

The number of entries in the array is equal to [ReadHandle.ReadCount](/engine/6000.5/script-reference/unity/io/lowlevel/unsafe/readhandle/readcount.md), so this can be used to find the maximum size of the array. This field (and the array itself) is resized at the start of the read.

A truncated read occurs when the [ReadCommand](/engine/6000.5/script-reference/unity/io/lowlevel/unsafe/readcommand.md) describing the read operation specifies a [ReadCommand.Size](/engine/6000.5/script-reference/unity/io/lowlevel/unsafe/readcommand/size.md) and [ReadCommand.Offset](/engine/6000.5/script-reference/unity/io/lowlevel/unsafe/readcommand/offset.md) that extends past the end of the target file.
