{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Struct UnsafeStream.Reader | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct UnsafeStream.Reader

    Reads data from a buffer of an UnsafeStream.

    Namespace: Unity.Collections.LowLevel.Unsafe
    Assembly: solution.dll
    Syntax
    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

    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()

    Does nothing.

    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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)