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

Reader

struct in Unity.Collections

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

Description

Reads data from a buffer of a NativeStream.

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
ForEachCount The number of buffers in the stream of this reader.
RemainingItemCount The number of items not yet read from the buffer.

Public Methods

Method Description
BeginForEachIndex Readies this reader to read a particular buffer of the stream.
Count Returns the total number of items in the buffers of the stream.
EndForEachIndex Checks if all data has been read from the buffer.
GetUnsafeReader Returns the internal unsafe stream reader.
Peek Reads the next value from the buffer. Does not advance the reader.
Read Reads the next value from the buffer.
ReadUnsafePtr Returns a pointer to the next position to read from the buffer. Advances the reader some number of bytes.