Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

DataStreamReader.ReadBytes

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void ReadBytes(NativeArray<byte> array);

Parameters

Parameter Description
array Array to copy data into.

Description

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.


Declaration

public void ReadBytes(Span<byte> span);

Parameters

Parameter Description
span Span to copy data into.

Description

Read and copy data into the given Span of bytes. An error will be logged if not enough bytes are available to fill the array, and DataStreamReader.HasFailedReads will then be true.