Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity how to get data of play session time in a text file?

        string path = Application.dataPath + "/Data/DataLog.txt";

        if (!File.Exists(path))
        {
            File.WriteAllText(path, "Level Test1 

");
        }

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

        File.AppendAllText(path, date);
 
PREVIOUS NEXT
Tagged: #unity #data #play #session #time #text
ADD COMMENT
Topic
Name
4+9 =