docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TryBeginReadBits

    TryBeginReadBits(uint)

    Verifies the requested bit count can be read from the buffer. This exists as a separate method to allow multiple bit reads to be bounds checked with a single call. If it returns false, you may not read, and in editor and development builds, attempting to do so will throw an exception. In release builds, attempting to do so will read junk memory.

    Declaration
    public bool TryBeginReadBits(uint bitCount)
    Parameters
    Type Name Description
    uint bitCount

    Number of bits you want to read, in total

    Returns
    Type Description
    bool

    True if you can read, false if that would exceed buffer bounds

    In This Article
    Back to top
    Copyright © 2024 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)