Пример #1
0
    /// <summary>
    /// Creates a file of the type. Is a .txt with extension .sm
    ///
    /// </summary>
    /// <param name="type"></param>
    public static void CreateFile(string type, string text)
    {
        if (string.IsNullOrEmpty(text))
        {
            return;
        }

        ManagerReport.AddNewText(type, text);

        var nameFile =
            SteamFriends.GetPersonaName() + "." + SteamUser.GetSteamID() +
            "_" + DateTime.Now.ToString("yy.MM.dd") +
            "_" + DateTime.Now.ToString("HH.mm.ss") +
            "_" + type + ".zip";

        var path = Application.dataPath + "/" + nameFile;

        Debug.Log(path);
        File.WriteAllText(path, FileHeader() + text);

        if (SteamUser.GetSteamID().m_SteamID == 76561198245800476 ||
            SteamUser.GetSteamID().m_SteamID == 76561197970401438)
        {
            Debug.Log("CreatFile Stopped");
            return;
        }

        LogUploader.UploadDirectToAWSCarlos(path);
    }