• Home
  • Guides
  • API Documentation
WLT documentation has moved.

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 Core WLT section of the dot net API explorer and related pages. Existing content will remain here but will not be updated further.

  • API Documentation
Search Results for

    Show / Hide Table of Contents

    Class SimpleConsole

    A simple runtime console to help in debugging on device.

    Inheritance
    Object
    SimpleConsole
    Namespace: Microsoft.MixedReality.WorldLocking.Tools
    Assembly: cs.temp.dll.dll
    Syntax
    public class SimpleConsole : MonoBehaviour
    Remarks

    The system accepts a verbosity level along with each line of text. If the system is enabled, If the verbosity level is >= the logVerbosity the line is written to the Unity log file via Debug.Log(). If the verbosity level is >= the screenVerbosity the line will be displayed on screen. If the system is NOT enabled If the verbosity level is >= 5 the line is written to the Unity log file. To enable the system:

    1. Add a SimpleConsole component to any game object in the scene.
    2. Fill in the SimpleConsole's TextMesh console field with a valid TextMesh. Ideally, place the console TextMesh where it can be seen. If enabled, then every frame the last lineCount lines added are displayed on the console TextMesh, where lineCount is an inspector accessible property below. Use is thread safe, and from threads besides the main thread.

    Fields

    console

    Declaration
    public TextMesh console
    Field Value
    Type Description
    TextMesh

    logVerbosity

    Declaration
    public int logVerbosity
    Field Value
    Type Description
    Int32

    screenVerbosity

    Declaration
    public int screenVerbosity
    Field Value
    Type Description
    Int32

    Properties

    Active

    Whether the onscreen component is active.

    Declaration
    public static bool Active { get; }
    Property Value
    Type Description
    Boolean

    LineCount

    The maximum number of lines to display.

    Declaration
    public int LineCount { get; set; }
    Property Value
    Type Description
    Int32

    LogFile

    Declaration
    public string LogFile { get; set; }
    Property Value
    Type Description
    String

    Methods

    AddLine(Int32, String)

    Static helper for adding a line of text for output.

    Declaration
    public static int AddLine(int level, string line)
    Parameters
    Type Name Description
    Int32 level

    The verbosity level of this line.

    String line

    The text to display and/or write.

    Returns
    Type Description
    Int32

    The number of lines added.

    In This Article
    • Fields
      • console
      • logVerbosity
      • screenVerbosity
    • Properties
      • Active
      • LineCount
      • LogFile
    • Methods
      • AddLine(Int32, String)
    Back to top Generated by DocFX