ReadBytes
Read and copy data into the given NativeArray of bytes. An error will be logged if not enough bytes are available to fill the array, and DataStreamReader.HasFailedReads will then be true.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
ReadBytes(NativeArray<byte>)
Read and copy data into the given NativeArray of bytes. An error will be logged if not enough bytes are available to fill the array, and DataStreamReader.HasFailedReads will then be true.
public void ReadBytes(NativeArray<byte> array)
Parameters
Array to copy data into.
ReadBytes(Span<byte>)
Read and copy data into the given of bytes. An error will be logged if not enough bytes are available to fill the array, and DataStreamReader.HasFailedReads will then be true.
Spanpublic void ReadBytes(Span<byte> span)
Parameters
Span to copy data into.