Пример #1
0
 /// <summary>
 /// Track scene, first ensure Analytics has been init
 /// </summary>
 public void TrackScene(string sceneName)
 {
     if (Instance == null)
     {
         scenesQueue.Enqueue(sceneName);
     }
     else
     {
         AnalyticsLogger.TrackScene(sceneName);
     }
 }
Пример #2
0
    /// <summary>
    /// If anything has been queued of events/scene tracking before singleton initiation, track everything that has been accumulated in the queue.
    /// </summary>
    public void init()
    {
        AnalyticsLogger.OnSession();

        while (scenesQueue.Count > 0)
        {
            AnalyticsLogger.TrackScene(scenesQueue.Dequeue());
        }

        while (eventsQueue.Count > 0)
        {
            AnalyticsLogger.TrackEvent(eventsQueue.Dequeue());
        }
    }