I’m posting this here since I needed this badly due to not using multi-scene editing and having it where I had a loading screen scene that it needed to switch to if it didn’t find a main game object, ( (basically this makes it so that there are tons of red errors in my code of not found objects needed from the loading screen) so I just wanted to be able to clear it…I know this isn’t recommended but uh…complex story, but for those of you searching on google you’ll end up finding this topic… so here is the code for this. They changed the type name to UnityEditorInternal for Unity 5.5+:
using UnityEditor;
using System.Reflection;
public static void Misc_ClearLogConsole() {
Assembly assembly = Assembly.GetAssembly (typeof(SceneView));
Type logEntries = assembly.GetType ("UnityEditorInternal.LogEntries");
MethodInfo clearConsoleMethod = logEntries.GetMethod ("Clear");
clearConsoleMethod.Invoke (new object (), null);
}