Unity3D清除控制台log信息
2018-10-08 本文已影响0人
jojo911
[MenuItem("Edit/ClearConsole %#c", false, 37)]
public static void ClearConsole()
{
var logEntries = System.Type.GetType("UnityEditorInternal.LogEntries,UnityEditor.dll");
var clearMethod = logEntries.GetMethod("Clear", System.Reflection.BindingFlags.Static |
System.Reflection.BindingFlags.Public);
clearMethod.Invoke(null, null);
}