3 using System.Reflection;
4 using UnityEditor.ShortcutManagement;
7 namespace Essentials.EditorTweaks
17 [Shortcut(
"Clear Console", KeyCode.Space, ShortcutModifiers.Action)]
18 public static void Clear()
20 Assembly assembly = Assembly.GetAssembly(typeof(UnityEditor.Editor));
21 Type type = assembly.GetType(
"UnityEditor.LogEntries");
22 MethodInfo method = type.GetMethod(
"Clear");
23 method?.Invoke(
new object(),
null);