📜  unity 如何在文本文件中获取播放会话时间的数据? - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:39.509000             🧑  作者: Mango

代码示例1
string path = Application.dataPath + "/Data/DataLog.txt";

        if (!File.Exists(path))
        {
            File.WriteAllText(path, "Level Test1 \n\n");
        }

        string date = "Login Date: " + System.DateTime.Now + "\n";
        string timed = "Session Time: " + System.Timers.Timer;

        File.AppendAllText(path, date);