Struct NativeStream.Reader
Reads data from a buffer of a NativeStream.
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
[NativeContainer]
[NativeContainerIsReadOnly]
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
Name | Description |
---|---|
ForEachCount | The number of buffers in the stream of this reader. |
RemainingItemCount | The number of items not yet read from the buffer. |
Methods
Name | Description |
---|---|
BeginForEachIndex(int) | 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. |
Peek<T>() | Reads the next value from the buffer. Does not advance the reader. |
ReadUnsafePtr(int) | Returns a pointer to the next position to read from the buffer. Advances the reader some number of bytes. |
Read<T>() | Reads the next value from the buffer. |