{!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} Method Copy | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Copy

    Copy(int, int, int)

    Copies a range of bits from this array to another range in this array.

    Declaration
    public void Copy(int dstPos, int srcPos, int numBits)
    Parameters
    Type Name Description
    int dstPos

    Index of the first bit to set.

    int srcPos

    Index of the first bit to copy.

    int numBits

    Number of bits to copy.

    Remarks

    The bits to copy run from index srcPos up to (but not including) srcPos + numBits. The bits to set run from index dstPos up to (but not including) dstPos + numBits.

    The ranges may overlap, but the result in the overlapping region is undefined.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if either dstPos + numBits or srcPos + numBits exceed the length of this array.

    Copy(int, ref UnsafeBitArray, int, int)

    Copies a range of bits from an array to a range of bits in this array.

    Declaration
    public void Copy(int dstPos, ref UnsafeBitArray srcBitArray, int srcPos, int numBits)
    Parameters
    Type Name Description
    int dstPos

    Index of the first bit to set.

    UnsafeBitArray srcBitArray

    The source array.

    int srcPos

    Index of the first bit to copy.

    int numBits

    The number of bits to copy.

    Remarks

    The bits to copy in the source array run from index srcPos up to (but not including) srcPos + numBits. The bits to set in the destination array run from index dstPos up to (but not including) dstPos + numBits.

    It's fine if source and destination array are one and the same, even if the ranges overlap, but the result in the overlapping region is undefined.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if either dstPos + numBits or srcBitArray + numBits exceed the length of this array.

    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)