Created
October 11, 2019 02:19
-
-
Save Refsa/9d2530529bcc1216ceba163c14812bd8 to your computer and use it in GitHub Desktop.
Clear the content of the debug console window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public static class DebugExtensions | |
{ | |
public static void ClearConsole () | |
{ | |
var logentries = System.Type.GetType ("UnityEditor.LogEntries, UnityEditor.dll"); | |
var clearmethod = logentries.GetMethod ("Clear", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public); | |
clearmethod.Invoke (null, null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment