private IUnityAnalytics GetAnalyticsForResult(AnalyticsResult i_result)
        {
            IUnityAnalytics analytics = Substitute.For <IUnityAnalytics>();

            analytics.SendCustomEvent(Arg.Any <string>(), Arg.Any <IDictionary <string, object> >()).Returns(i_result);
            return(analytics);
        }
Пример #2
0
        public void SendCustomUnityAnalytic(string i_eventName, IDictionary <string, object> i_eventData)
        {
            AnalyticsResult result = mAnalytics.SendCustomEvent(i_eventName, i_eventData);

            if (result != AnalyticsResult.Ok)
            {
                string log = "Failed to send analytic " + i_eventName + " with reason: " + result.ToString();
                EasyLogger.Instance.Log(LogTypes.Warn, log, LOG_TYPE);
            }
        }