protected override void KGFAwake() { base.KGFAwake(); if (itsDataDebugFile.itsFilePath == string.Empty) { itsDataDebugFile.itsFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "KGFLog.txt"); } // create a new file using (var file = new StreamWriter(itsDataDebugFile.itsFilePath, false, Encoding.ASCII)) { file.WriteLine("".PadLeft("FileLogger started: ".Length + DateTime.Now.ToString().Length, '=')); } KGFDebug.AddLogger(this); }
public void Awake() { KGFDebug.AddLogger(this); }