Posts 유니티 - 스크립트로 콘솔 내용 지우기
Post
Cancel

유니티 - 스크립트로 콘솔 내용 지우기

1
2
3
4
5
6
7
8
9
10
11
private static MethodInfo clearMethodInfo;
private static void ClearLog()
{
    if (clearMethodInfo == null)
    {
        var assembly = Assembly.GetAssembly(typeof(UnityEditor.Editor));
        var type = assembly.GetType("UnityEditor.LogEntries");
        clearMethodInfo = type.GetMethod("Clear");
    }
    clearMethodInfo.Invoke(new object(), null);
}


Reference


This post is licensed under CC BY 4.0 by the author.