D
D
Dmitry Korolev2016-12-24 22:46:06
C++ / C#
Dmitry Korolev, 2016-12-24 22:46:06

How to clear the console from the code?

What method should be called to clear the console?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max Pushkarev, 2016-12-25
@adressmoeistranici

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

A
Ai Lab, 2016-12-24
@vpuhoff

Console.Clear

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question