文档

Unity Engine

Unity Engine

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.
阅读时间1 分钟最后更新于 1 个月前

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
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.
public void ReadBytes(Span<byte> span)

Parameters

Span to copy data into.