UnsafeStream.Reader
Reads data from a buffer of an UnsafeStream.
Read time 1 minuteLast updated 14 days ago
Definition
- Type: Struct
- Namespace: Unity.Collections.LowLevel.Unsafe
- Assembly: UnityEngine.ManagedKernelModule
public struct UnsafeStream.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 |
|---|---|
| ForEachCount | The number of buffers in the stream of this reader. |
| RemainingItemCount | The number of items not yet read from the buffer. |
| State | Gets or sets the state of this reader. |
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 | Does nothing. |
| 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. |