Created
November 17, 2016 15:10
-
-
Save mrcarriere/e5b35a81bf5a7df55d266907fc362d69 to your computer and use it in GitHub Desktop.
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 System; | |
using System.Reflection; | |
using UnityEditor; | |
namespace Zapdot | |
{ | |
public static class ConsoleTools | |
{ | |
public static void ClearLog() | |
{ | |
Assembly assembly = Assembly.GetAssembly(typeof(SceneView)); | |
Type type = assembly.GetType("UnityEditorInternal.LogEntries"); | |
MethodInfo method = type.GetMethod("Clear"); | |
method.Invoke(new object(), null); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment