UnityDebugger - OrderOfThePorcupine/ProjectPorcupine GitHub Wiki

In this project, a customized version of UnityDebugger is used instead of Debug.Log() and its variations. It allows the use of channels to filter debug messages.

Using UnityDebugger in the Editor

To view the UnityDebugger Channel Controls go to Window -> Debugger Channel Control. You can activate and deactivate channels by clicking the appropriate toggle. Channels aren't stored in the editor window until the PP has been ran at least once, and then only channels that get printed to will added to the control. All acts as a default for any channels that haven't been activated yet (have never been printed to), and also will toggle on/off all channels.

Using UnityDebugger in Code

To use UnityDebugger in your code you type UnityDebugger.Debugger.Log(string channel, string message);. channel is the log channel that the message will appear in. message is the debug message. For example, if you typed

UnityDebugger.Debugger.Log("Testing", "This is a test message");

you would see only see output on the Unity console if either the Testing channel had been turned on, or if it wasn't present yet if "All" was turned on. You can, of course, using UnityDebugger; to not have to include the UnityDebugger namespace in your call.

UnityDebugger.Debugger.LogWarning() and UnityDebugger.Debugger.LogError() work in the same way.