docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct FormatterStruct

    Interface that describes how to convert some object context into string

    Implements
    IFormatter
    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
    public struct FormatterStruct : IFormatter

    Fields

    OnFormatMessage

    Converts a LogMessage into UnsafeText

    Declaration
    public OnLogMessageFormatterDelegate OnFormatMessage
    Field Value
    Type Description
    OnLogMessageFormatterDelegate

    UseTextBlittable

    It is a JSON formatter if 1, text if 0

    Declaration
    public byte UseTextBlittable
    Field Value
    Type Description
    byte

    Properties

    IsCreated

    True if the structure was initialized

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    bool

    UseText

    Checks if this is a JSON or text formatter

    Declaration
    public bool UseText { get; set; }
    Property Value
    Type Description
    bool

    Returns true if this is a text formatter, false if JSON

    Methods

    AfterObject(ref UnsafeText)

    Declaration
    public bool AfterObject(ref UnsafeText output)
    Parameters
    Type Name Description
    UnsafeText output
    Returns
    Type Description
    bool

    AppendDelimiter(ref UnsafeText)

    Declaration
    public bool AppendDelimiter(ref UnsafeText output)
    Parameters
    Type Name Description
    UnsafeText output
    Returns
    Type Description
    bool

    BeforeObject(ref UnsafeText)

    Declaration
    public bool BeforeObject(ref UnsafeText output)
    Parameters
    Type Name Description
    UnsafeText output
    Returns
    Type Description
    bool

    BeginProperty(ref UnsafeText, string)

    Declaration
    public bool BeginProperty(ref UnsafeText output, string fieldName)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    Returns
    Type Description
    bool

    BeginProperty<T>(ref UnsafeText, ref T)

    Declaration
    public bool BeginProperty<T>(ref UnsafeText output, ref T fieldName) where T : unmanaged, IUTF8Bytes, INativeList<byte>
    Parameters
    Type Name Description
    UnsafeText output
    T fieldName
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    EndProperty(ref UnsafeText, string)

    Declaration
    public bool EndProperty(ref UnsafeText output, string fieldName)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    Returns
    Type Description
    bool

    EndProperty<T>(ref UnsafeText, ref T)

    Declaration
    public bool EndProperty<T>(ref UnsafeText output, ref T fieldName) where T : unmanaged, IUTF8Bytes, INativeList<byte>
    Parameters
    Type Name Description
    UnsafeText output
    T fieldName
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    WriteChild<T>(ref UnsafeText, string, ref T, ref LogMemoryManager, ref ArgumentInfo, int)

    Declaration
    public bool WriteChild<T>(ref UnsafeText output, string fieldName, ref T field, ref LogMemoryManager memAllocator, ref ArgumentInfo currArgSlot, int depth) where T : unmanaged, ILoggableMirrorStruct
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    T field
    LogMemoryManager memAllocator
    ArgumentInfo currArgSlot
    int depth
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    WriteProperty(ref UnsafeText, string, bool, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, bool b, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    bool b
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, byte, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, byte c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    byte c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, char, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, char c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    char c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, decimal, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, decimal c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    decimal c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, double, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, double c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    double c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, short, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, short c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    short c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, int, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, int c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    int c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, long, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, long c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    long c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, IntPtr, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, IntPtr p, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    IntPtr p
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, sbyte, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, sbyte c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    sbyte c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, float, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, float c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    float c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, ushort, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, ushort c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    ushort c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, uint, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, uint c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    uint c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, ulong, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, ulong c, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    ulong c
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, UIntPtr, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, UIntPtr p, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    UIntPtr p
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty(ref UnsafeText, string, PayloadHandle, ref LogMemoryManager, ref ArgumentInfo)

    Declaration
    public bool WriteProperty(ref UnsafeText output, string fieldName, PayloadHandle payload, ref LogMemoryManager memAllocator, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    PayloadHandle payload
    LogMemoryManager memAllocator
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    WriteProperty<T>(ref UnsafeText, string, in T, ref ArgumentInfo)

    Declaration
    public bool WriteProperty<T>(ref UnsafeText output, string fieldName, in T fs, ref ArgumentInfo currArgSlot) where T : unmanaged, INativeList<byte>, IUTF8Bytes
    Parameters
    Type Name Description
    UnsafeText output
    string fieldName
    T fs
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T

    WriteUTF8String(ref UnsafeText, byte*, int, ref ArgumentInfo)

    Declaration
    public bool WriteUTF8String(ref UnsafeText output, byte* ptr, int lengthBytes, ref ArgumentInfo currArgSlot)
    Parameters
    Type Name Description
    UnsafeText output
    byte* ptr
    int lengthBytes
    ArgumentInfo currArgSlot
    Returns
    Type Description
    bool

    Implements

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