private static void InitializeBeforeSceneLoad() { MixpanelSettings.LoadSettings(); if (Config.ManualInitialization) { return; } Initialize(); }
private static void InitializeBeforeSceneLoad() { MixpanelSettings.LoadSettings(); if (Config.ManualInitialization) { return; } Initialize(); Mixpanel.Log($"Track Queue Depth: {MixpanelStorage.TrackPersistentQueue.CurrentCountOfItemsInQueue}"); Mixpanel.Log($"Engage Queue Depth: {MixpanelStorage.EngagePersistentQueue.CurrentCountOfItemsInQueue}"); }
public static void LoadSettings() { if (!_instance) { _instance = FindOrCreateInstance(); string host = _instance.APIHostAddress.EndsWith("/") ? _instance.APIHostAddress : $"{_instance.APIHostAddress}/"; Config.TrackUrl = string.Format(TrackUrlTemplate, host); Config.EngageUrl = string.Format(EngageUrlTemplate, host); Config.ShowDebug = _instance.ShowDebug; Config.FlushInterval = _instance.FlushInterval; } }
private static MixpanelSettings FindOrCreateInstance() { MixpanelSettings instance = null; instance = instance ? null : Resources.Load <MixpanelSettings>("Mixpanel"); instance = instance ? instance : Resources.LoadAll <MixpanelSettings>(string.Empty).FirstOrDefault(); instance = instance ? instance : CreateAndSave <MixpanelSettings>(); if (instance == null) { throw new Exception("Could not find or create settings for Mixpanel"); } return(instance); }
private IEnumerator Start() { MigrateFrom1To2(); DontDestroyOnLoad(this); StartCoroutine(PopulatePools()); MixpanelSettings.LoadSettings(); Worker.StartWorkerThread(); TrackIntegrationEvent(); while (true) { yield return(new WaitForSecondsRealtime(Config.FlushInterval)); DoFlush(); } }