Пример #1
0
 public static AnalyticsResult Transaction(string productId, decimal amount, string currency, string receiptPurchaseData, string signature)
 {
                 #if UNITY_ANALYTICS_SUPPORTED_PLATFORM
     IUnityAnalyticsSession session = UnityAnalytics.GetSingleton();
     return((AnalyticsResult)session.Transaction(productId, amount, currency, receiptPurchaseData, signature));
                 #else
     return(AnalyticsResult.UnsupportedPlatform);
                 #endif
 }
Пример #2
0
 public static AnalyticsResult SetUserBirthYear(int birthYear)
 {
                 #if UNITY_ANALYTICS_SUPPORTED_PLATFORM
     IUnityAnalyticsSession session = UnityAnalytics.GetSingleton();
     return((AnalyticsResult)session.SetUserBirthYear(birthYear));
                 #else
     return(AnalyticsResult.UnsupportedPlatform);
                 #endif
 }
Пример #3
0
 public static AnalyticsResult StartSDK(string appId)
 {
                 #if UNITY_ANALYTICS_SUPPORTED_PLATFORM
     IUnityAnalyticsSession session = UnityAnalytics.GetSingleton();
     return((AnalyticsResult)session.StartWithAppId(appId));
                 #else
     return(AnalyticsResult.UnsupportedPlatform);
                 #endif
 }
Пример #4
0
 public static AnalyticsResult SetUserGender(Gender gender)
 {
                 #if UNITY_ANALYTICS_SUPPORTED_PLATFORM
     IUnityAnalyticsSession session = UnityAnalytics.GetSingleton();
     return((AnalyticsResult)session.SetUserGender(gender == Gender.Male ? "M" : gender == Gender.Female ? "F" : "U"));
                 #else
     return(AnalyticsResult.UnsupportedPlatform);
                 #endif
 }
Пример #5
0
 public static AnalyticsResult CustomEvent(string customEventName, IDictionary <string, object> eventData)
 {
                 #if UNITY_ANALYTICS_SUPPORTED_PLATFORM
     IUnityAnalyticsSession session = UnityAnalytics.GetSingleton();
     return((AnalyticsResult)session.CustomEvent(customEventName, eventData));
                 #else
     return(AnalyticsResult.UnsupportedPlatform);
                 #endif
 }