问题描述
我想知道有没有办法清除游戏构建后浏览器中弹出的错误?
我尝试了网上找到的这段代码,但没有按预期工作。我尝试将下面的脚本放在 Editor 文件夹中,但效果不佳。
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEngine;
using System.Reflection;
//using UnityEditor;
public class ClearConsole : MonoBehavIoUr
{
public void ClearLog()
{
var assembly = Assembly.GetAssembly(typeof(UnityEditor.Editor));
var type = assembly.GetType("UnityEditor.LogEntries");
var method = type.getmethod("Clear");
method.Invoke(new object(),null);
}
void Update()
{
ClearLog();
}
}
#endif
对不起我的英语。提前致谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)