如果直接
會造成UnityEnging.Object與object的衝突
using System
會造成UnityEnging.Object與object的衝突
using sys = System; static void clearConsoleLog () { Assembly assembly = Assembly.GetAssembly(typeof(SceneView)); sys.Type type = assembly.GetType("UnityEditorInternal.LogEntries"); MethodInfo method = type.GetMethod ("Clear"); method.Invoke (new object (), null); }
沒有留言:
張貼留言