docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Delegate LogWriterUtils.OutputWriterHandler

    Defines a delegate to handle writing the field data for context data structs.

    Namespace: Unity.Logging
    Assembly: Unity.Logging.dll
    Syntax
    public delegate LogWriterUtils.ContextWriteResult LogWriterUtils.OutputWriterHandler(ref FormatterStruct formatter, ref UnsafeText outputUnsafeText, ref BinaryParser mem, IntPtr memAllocator, ref ArgumentInfo holeInfo)
    Parameters
    Type Name Description
    FormatterStruct formatter

    Formatter that should be used to populate output text

    UnsafeText outputUnsafeText

    Reference to a UnsafeListString object to which the delegate writes the struct's data.

    BinaryParser mem

    Pointer + size of data to parse

    IntPtr memAllocator

    Memory manager that owns the binary data

    ArgumentInfo holeInfo

    Hole setup, like format specifiers

    Returns
    Type Description
    LogWriterUtils.ContextWriteResult

    Value indicating delegate successfully handled the data or not.

    Remarks

    The LogWriterUtils calls into these delegates in order to write the struct data to the output string. Delegates can be added or removed from the active list of handlers by calling AddOutputHandler(OutputWriterHandler, bool) and RemoveOutputHandler(IntPtr) respectively. By default, source generation will produce the output handlers and add the delegates to the handle list.

    NOTE: Burst FunctionPointers only support delegates with primitive parameter types; structs cannot be passed, even by reference.

    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)