Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NativeStream.Reader

Reads data from a buffer of a NativeStream.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Struct
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule
public struct NativeStream.Reader

Remarks

An individual reader can only be used for one buffer of one stream. Do not create more than one reader for an individual buffer.

Properties

Property

Description

ForEachCountThe number of buffers in the stream of this reader.
RemainingItemCountThe number of items not yet read from the buffer.

Methods

Method

Description

BeginForEachIndexReadies this reader to read a particular buffer of the stream.
CountReturns the total number of items in the buffers of the stream.
EndForEachIndexChecks if all data has been read from the buffer.
GetUnsafeReaderReturns the internal unsafe stream reader.
PeekReads the next value from the buffer. Does not advance the reader.
ReadReads the next value from the buffer.
ReadUnsafePtrReturns a pointer to the next position to read from the buffer. Advances the reader some number of bytes.