public void Awake() { switch (CurrentPlatform) { case AnalyticsPlatform.Google: //var GAV4 = GetComponentInChildren<GoogleAnalyticsV4>(); //if (GAV4 == null) //{ // Debug.LogErrorFormat("{[0]} Did you forget to place the Google Analytics V4 script on the controller?!", "GOOGLE ANALYTICS"); // return; //} //_currentAnalyticsController = new GoogleAnalyticsController(GAV4); break; case AnalyticsPlatform.Unity: _currentAnalyticsController = new UnityAnalyticsController(); break; } }
private void OnDestroy() { _currentAnalyticsController = null; }