Inheritance: MonoBehaviour
Ejemplo n.º 1
0
    /// <summary>
    /// Submit any queued up data immediately. Useful when you want to control when data is submitted.
    /// </summary>
    public static void ForceSubmit()
    {
        GA_SpecialEvents.SubmitAverageFPS();

        //If we have internet connection then add any archived data to the submit queue
        if (GA.SettingsGA.ArchiveData && GA.SettingsGA.InternetConnectivity)
        {
            List <GA_Submit.Item> archivedItems = GA.API.Archive.GetArchivedData();

            if (archivedItems != null && archivedItems.Count > 0)
            {
                foreach (GA_Submit.Item item in archivedItems)
                {
                    GA_Queue.AddItem(item.Parameters, item.Type, false);
                }

                if (GA.SettingsGA.DebugMode)
                {
                    GA.Log("GA: Network connection detected. Adding archived data to next submit queue.");
                }
            }
        }

        //If we have something to submit and we have not stopped submitting completely then we start submitting data
        if (_queue.Count > 0 && !_submittingData && !_endsubmit)
        {
            _submittingData = true;

            GA.Log("GameAnalytics: Queue submit started");

            GA.API.Submit.SubmitQueue(_queue, Submitted, SubmitError, false, string.Empty, string.Empty);
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Submit any queued up data immediately. Useful when you want to control when data is submitted.
    /// </summary>
    public static void ForceSubmit()
    {
        GA_SpecialEvents.SubmitAverageFPS();

        //If we have something to submit and we have not stopped submitting completely then we start submitting data
        if (_queue.Count > 0 && !_submittingData && !_endsubmit)
        {
            _submittingData = true;

            GA.Log("GameAnalytics: Queue submit started");

            GA.API.Submit.SubmitQueue(_queue, Submitted, SubmitError, false, string.Empty, string.Empty);
        }
    }