美文网首页
Unity3D清除控制台log信息

Unity3D清除控制台log信息

作者: jojo911 | 来源:发表于2018-10-08 18:29 被阅读0次

[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);  

    }  

相关文章

网友评论

      本文标题:Unity3D清除控制台log信息

      本文链接:https://www.haomeiwen.com/subject/pfijaftx.html