docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct HeaderData

    Decodes payload for LogMessages

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Logging
    Assembly: Unity.Logging.dll
    Syntax
    [BurstCompile]
    public readonly struct HeaderData

    Fields

    ContextBufferCount

    Payload handles that are context buffers

    Declaration
    public readonly int ContextBufferCount
    Field Value
    Type Description
    int

    DecorationBufferCount

    Payload handles that are decoration buffers

    Declaration
    public readonly ushort DecorationBufferCount
    Field Value
    Type Description
    ushort

    Error

    Error code that was detected during the parsing of the binary data

    Declaration
    public readonly ErrorCodes Error
    Field Value
    Type Description
    ErrorCodes

    MessageBufferLength

    Message buffer length in bytes

    Declaration
    public readonly int MessageBufferLength
    Field Value
    Type Description
    int

    MessageBufferPointer

    Pointer to message buffer UTF8 string

    Declaration
    public readonly byte* MessageBufferPointer
    Field Value
    Type Description
    byte*

    Payloads

    Payload handles attached to the LogMessage

    Declaration
    public readonly PayloadHandle* Payloads
    Field Value
    Type Description
    PayloadHandle*

    PayloadsCount

    Count of payload handles attached to the LogMessage

    Declaration
    public readonly int PayloadsCount
    Field Value
    Type Description
    int

    Properties

    ContextStartIndex

    Index of payload handle that is context buffer

    Declaration
    public int ContextStartIndex { get; }
    Property Value
    Type Description
    int

    DecorationPairs

    Number of payload handles that are decoration pairs

    Declaration
    public ushort DecorationPairs { get; }
    Property Value
    Type Description
    ushort

    Methods

    Parse(in LogMessage, ref LogMemoryManager)

    Parses Header of the binary data

    Declaration
    public static HeaderData Parse(in LogMessage messageData, ref LogMemoryManager memAllocator)
    Parameters
    Type Name Description
    LogMessage messageData

    LogMessage that owns the binary data

    LogMemoryManager memAllocator

    Memory manager that has the binary data

    Returns
    Type Description
    HeaderData

    Parsed HeaderData

    TryGetContextPayload(int, out PayloadHandle)

    Try to get the PayloadHandle for the context payload by index

    Declaration
    public bool TryGetContextPayload(int contextIndex, out PayloadHandle payloadHandle)
    Parameters
    Type Name Description
    int contextIndex

    Index of the context payload

    PayloadHandle payloadHandle

    Resulting PayloadHandle, or default if not found

    Returns
    Type Description
    bool

    True if the context payload was found

    TryGetDecorationPayload(int, ref LogMemoryManager, out NativeArray<byte>, out PayloadHandle)

    Try to get the PayloadHandle for the decoration payload by the pair index

    Declaration
    public bool TryGetDecorationPayload(int decorationPairIndex, ref LogMemoryManager memAllocator, out NativeArray<byte> nameArray, out PayloadHandle dataHandle)
    Parameters
    Type Name Description
    int decorationPairIndex

    Pair index

    LogMemoryManager memAllocator

    Memory manager that has the binary data

    NativeArray<byte> nameArray

    Result - name of the decoration

    PayloadHandle dataHandle

    Result - data of the decoration

    Returns
    Type Description
    bool

    True if the decoration payload was found

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