コード例 #1
0
ファイル: KGFDebugFile.cs プロジェクト: manboygames/capsa
    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);
    }
コード例 #2
0
 public void Awake()
 {
     KGFDebug.AddLogger(this);
 }