private void Awake()
{
Application.logMessageReceived += HandleLog;
} private void HandleLog(string condition, string stackTrace, LogType type)
{ if (type == LogType.Error || type == LogType.Exception)
{
string message = string.Format("Error:{0}\nTime:{1}\n{2}", condition, time, stackTrace); //错误或者异常
}
}