{!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 RetrieveDisjointedPayloadBuffer | Unity Logging | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method RetrieveDisjointedPayloadBuffer

    RetrieveDisjointedPayloadBuffer(PayloadHandle, int, out NativeArray<byte>)

    Retrieves a NativeArray to safely access an individual Payload that's part of a Disjointed buffer.

    Declaration
    public bool RetrieveDisjointedPayloadBuffer(PayloadHandle handle, int payloadBufferIndex, out NativeArray<byte> payloadBuffer)
    Parameters
    Type Name Description
    PayloadHandle handle

    A PayloadHandle value the references a valid Disjointed buffer."

    int payloadBufferIndex

    Index of the Payload, referenced by the Disjointed buffer, to retrieve.

    NativeArray<byte> payloadBuffer

    NativeArray that allows safe access to the allocated Payload buffer.

    Returns
    Type Description
    bool

    True if successfully accessed Payload buffer.

    Remarks

    See RetrieveDisjointedPayloadBuffer(PayloadHandle, int, bool, out NativeArray<byte>).

    RetrieveDisjointedPayloadBuffer(PayloadHandle, int, bool, out NativeArray<byte>)

    Retrieves a NativeArray to safely access an individual Payload that's part of a Disjointed buffer.

    Declaration
    public bool RetrieveDisjointedPayloadBuffer(PayloadHandle handle, int payloadBufferIndex, bool readWriteAccess, out NativeArray<byte> payloadBuffer)
    Parameters
    Type Name Description
    PayloadHandle handle

    A PayloadHandle value the references a valid Disjointed buffer."

    int payloadBufferIndex

    Index of the Payload, referenced by the Disjointed buffer, to retrieve.

    bool readWriteAccess

    True to allow write-access to the returned NativeArray, otherwise it's read-only.

    NativeArray<byte> payloadBuffer

    NativeArray that allows safe access to the allocated Payload buffer.

    Returns
    Type Description
    bool

    True if successfully accessed Payload buffer.

    Remarks

    See AllocateDisjointedBuffer(ref FixedList64Bytes<ushort>, NativeList<PayloadHandle>) for a general overview on "Disjointed" payload buffers.

    Use this method to safely retrieve one of the Payload buffers, that's referenced by a Disjointed buffer, for reading or writing payload data, similar to RetrievePayloadBuffer(PayloadHandle, bool, out NativeArray<byte>).

    The Payload buffer to retrieve is specified by an index of the PayloadHandle value within the head buffer. This index value corresponds to the list index used to create the Disjointed buffer. That is, the Payload size list passed into AllocateDisjointedBuffer(ref FixedList64Bytes<ushort>, NativeList<PayloadHandle>) or the PayloadHandle value list passed into CreateDisjointedPayloadBufferFromExistingPayloads(ref FixedList512Bytes<PayloadHandle>).

    As with RetrievePayloadBuffer(PayloadHandle, bool, out NativeArray<byte>), the returned NativeArray is a "view" into the actual memory and must not be stored; it's only for immediate access to the underlying memory.

    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)