docs.unity3d.com
    Show / Hide Table of Contents

    Delegate LogWriterUtils.OutputWriterHandler

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

    Namespace: Unity.Logging
    Syntax
    public delegate LogWriterUtils.ContextWriteResult 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(LogWriterUtils.OutputWriterHandler, Boolean) 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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023