Exemple #1
0
    /// <summary>
    /// Writes the XML file from the tracking manager. TODO: make it upload it, make it return an error, make it wipe the events list.
    /// </summary>
    public void WriteAndUploadFile(Text errorText)
    {
        _trackingManager.XMLWriteEventList(controls);
        bool b = _trackingManager.Upload();

        if (b)
        {
            //if upload works
            _trackingManager.ClearList();
            EndGameMoveOn();
        }
        else
        {
            //if upload fails
            //set the string and let players try again
            errorText.text = "Something went wrong with the upload: check your network connection and try again.";
        }
    }