Before writing the debug.log .. unity5.x like code, then packaged in the current program will have a folder corresponding to "outlog.txt", then the file 2017 is moved to the disc user C Appdata / LocalLow / company name folder. Inconvenient wrote on his own
Code:
using UnityEngine;
using System.IO;
using System;
using System.Diagnostics;
using Debug = UnityEngine.Debug;
public class DebugTrace
{
private FileStream fileStream;
private StreamWriter streamWriter;
private bool isEditorCreate = false; // whether to generate a log file in an editor
private int showFrames = 1000; // print all
#region instance
private static readonly object obj = new object();
private static DebugTrace m_instance;
public static DebugTrace Instance
{
get
{
if (m_instance == null)
{
lock (obj)
{
if (m_instance == null)
m_instance = new DebugTrace();
}
}
return m_instance;
}
}
#endregion
private DebugTrace()
{
}