示例#1
0
 void ConfigureTelemetry()
 {
     _telemetryLibrary = TelemetryFactory.GetTelemetryInstance();
     _telemetryLibrary.Initialize(_configuration.AccessToken);
     _telemetryLibrary.SetLocationCollectionState(GetTelemetryCollectionState());
     _telemetryLibrary.SendTurnstile();
 }
示例#2
0
        void ConfigureTelemetry()
        {
#if UNITY_EDITOR
            _telemetryLibrary = TelemetryEditor.Instance;
#elif UNITY_IOS
            _telemetryLibrary = TelemetryIos.Instance;
#elif UNITY_ANDROID
            _telemetryLibrary = TelemetryAndroid.Instance;
#else
            _telemetryLibrary = TelemetryFallback.Instance;
#endif


            _telemetryLibrary.Initialize(_configuration.AccessToken);
            _telemetryLibrary.SetLocationCollectionState(GetTelemetryCollectionState());
            _telemetryLibrary.SendTurnstile();
        }
示例#3
0
 void ConfigureTelemetry()
 {
     // TODO: enable after token validation has been made async
     //if (
     //	null == _configuration
     //	|| string.IsNullOrEmpty(_configuration.AccessToken)
     //	|| !_tokenValid
     //)
     //{
     //	Debug.LogError(_tokenNotSetErrorMessage);
     //	return;
     //}
     try
     {
         _telemetryLibrary = TelemetryFactory.GetTelemetryInstance();
         _telemetryLibrary.Initialize(_configuration.AccessToken);
         _telemetryLibrary.SetLocationCollectionState(GetTelemetryCollectionState());
         _telemetryLibrary.SendTurnstile();
     }
     catch (Exception ex)
     {
         Debug.LogErrorFormat("Error initializing telemetry: {0}", ex);
     }
 }