private void Application_LogMessageReceived(string condition, string stackTrace, LogType type) { if (!isOpen) { return; } if (!m_LogPanel.gameObject.activeSelf) { m_LogPanel.SetActive(true); } if (!isLoging) { return; } switch (type) { case LogType.Log: AddLine("[I]" + condition, stackTrace, Color.green); break; case LogType.Warning: //AddLine("[W]" + condition, stackTrace, Color.yellow); break; case LogType.Assert: AddLine("[A]" + condition, stackTrace, Color.black); break; case LogType.Error: AddLine("[E]" + condition, stackTrace, Color.red); //MyDebug.AddOutPutLog(condition + "\n" + stackTrace); break; case LogType.Exception: AddLine("[X]" + condition, stackTrace, Color.magenta); MyDebug.AddOutPutLog(condition + "\n" + stackTrace); break; } }
private void Application_LogMessageReceivedThread(string condition, string stackTrace, LogType type) { if (!ThreadRecrive) { return; //防止双倍输出 } if (!isLoging) { return; } switch (type) { case LogType.Log: AddLineThread("[I]" + condition, stackTrace, Color.green); break; case LogType.Warning: //AddLineThread("[W]" + condition, stackTrace, Color.yellow); break; case LogType.Assert: AddLineThread("[A]" + condition, stackTrace, Color.black); break; case LogType.Error: AddLineThread("[E]" + condition, stackTrace, Color.red); //MyDebug.AddOutPutLog(condition + "\n" + stackTrace); break; case LogType.Exception: AddLineThread("[X]" + condition, stackTrace, Color.magenta); MyDebug.AddOutPutLog(condition + "\n" + stackTrace); break; } }