using UnityEditor;
using System.Reflection;
using System;
public static class Utils {
static MethodInfo _clearConsoleMethod;
static MethodInfo clearConsoleMethod {
get {
if (_clearConsoleMethod == null) {
Assembly assembly = Assembly.GetAssembly (typeof(SceneView));
Type logEntries = assembly.GetType ("UnityEditor.LogEntries");
_clearConsoleMethod = logEntries.GetMethod ("Clear");
}
return _clearConsoleMethod;
}
}
public static void ClearLogConsole() {
clearConsoleMethod.Invoke (new object (), null);
}
}
SourceOnce I place this clearConsoleMethod.cs script in a custom scripts folder, I should be able to call it from within Playmaker, yes?