mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0releases/2.3.0releases/2.4.0releases/2.5.0releases/2.5.1releases/2.5.2releases/2.5.3

We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

Search Results for

    Show / Hide Table of Contents

    Class DebugUtilities

    Inheritance
    Object
    DebugUtilities
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Utilities
    Assembly: cs.temp.dll.dll
    Syntax
    public static class DebugUtilities

    Fields

    LogLevel

    This helper defaults to showing all messages of information and above (i.e. including warnings and errors)

    Declaration
    public static DebugUtilities.LoggingLevel LogLevel
    Field Value
    Type Description
    DebugUtilities.LoggingLevel

    Methods

    DebugAssert(Boolean)

    Asserts a condition.

    Declaration
    public static void DebugAssert(bool condition)
    Parameters
    Type Name Description
    Boolean condition

    The condition that is expected to be true.

    DebugAssert(Boolean, String)

    Asserts a condition.

    Declaration
    public static void DebugAssert(bool condition, string message)
    Parameters
    Type Name Description
    Boolean condition

    The condition that is expected to be true.

    String message

    The message to display if the condition evaluates to false.

    DebugLog(String)

    Logs a message.

    Declaration
    [Obsolete("Deprecated. Use Log instead.")]
    public static void DebugLog(string message)
    Parameters
    Type Name Description
    String message

    The message to log.

    DebugLogError(String)

    Logs an error message.

    Declaration
    [Obsolete("Deprecated. Use LogError instead.")]
    public static void DebugLogError(string message)
    Parameters
    Type Name Description
    String message

    The message to log.

    DebugLogWarning(String)

    Logs a warning message.

    Declaration
    [Obsolete("Deprecated. Use LogWarning instead.")]
    public static void DebugLogWarning(string message)
    Parameters
    Type Name Description
    String message

    The message to log.

    DrawBounds(Bounds, Color, Color)

    Draws the minimum and maximum points of the given bounds

    Declaration
    public static void DrawBounds(Bounds bounds, Color minColor, Color maxColor)
    Parameters
    Type Name Description
    Bounds bounds
    Color minColor
    Color maxColor

    DrawPoint(Vector3, Color, Single)

    Draws a point in the Scene window.

    Declaration
    public static void DrawPoint(Vector3 point, Color color, float size = 0.05F)
    Parameters
    Type Name Description
    Vector3 point
    Color color
    Single size

    DrawPoint(Vector3, Quaternion, Color, Single)

    Draws a point with a rotation in the Scene window.

    Declaration
    public static void DrawPoint(Vector3 point, Quaternion rotation, Color color, float size = 0.05F)
    Parameters
    Type Name Description
    Vector3 point
    Quaternion rotation
    Color color
    Single size

    Log(String)

    Logs a message at the informational level.

    Declaration
    public static void Log(string message)
    Parameters
    Type Name Description
    String message

    The message to log.

    LogError(String)

    Logs an error message.

    Declaration
    public static void LogError(string message)
    Parameters
    Type Name Description
    String message

    The message to log.

    LogVerbose(String)

    Logs the given message to the Unity console and player log if verbose logging is enabled.

    Declaration
    public static void LogVerbose(string message)
    Parameters
    Type Name Description
    String message
    Remarks

    If you are doing string concatentation or manipulation, use LogVerboseFormat that formats the string, as that will not allocate memory when verbose logging is enabled.

    For example, don't do: Debug.LogVerbose("This is my message: " + text);

    Do: Debug.LogVerbose("This is my message: {0}", text);

    Note that verbose logs do not include the callstack to reduce the noise in the generated editor log. Even with default stack trace parameter (StackTraceLogType.ScriptOnly), the editor logs will grow significantly (i.e. a 10x+ line growth factor).

    LogVerboseFormat(String, Object[])

    Formats and logs the given message to the Unity console and player log if verbose logging is enabled. Note that verbose logs do not include the callstack

    Declaration
    public static void LogVerboseFormat(string message, params object[] args)
    Parameters
    Type Name Description
    String message
    Object[] args

    LogWarning(String)

    Logs a warning message.

    Declaration
    public static void LogWarning(string message)
    Parameters
    Type Name Description
    String message

    The message to log.

    In This Article
    • Fields
      • LogLevel
    • Methods
      • DebugAssert(Boolean)
      • DebugAssert(Boolean, String)
      • DebugLog(String)
      • DebugLogError(String)
      • DebugLogWarning(String)
      • DrawBounds(Bounds, Color, Color)
      • DrawPoint(Vector3, Color, Single)
      • DrawPoint(Vector3, Quaternion, Color, Single)
      • Log(String)
      • LogError(String)
      • LogVerbose(String)
      • LogVerboseFormat(String, Object[])
      • LogWarning(String)
    Back to top Generated by DocFX