瀏覽代碼

移除talkingdata

lzx 2 天之前
父節點
當前提交
90db487243

+ 0 - 8
Assets/Scripts/ThirdParty/TalkingDataScripts.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: D3hKsnyuB3o+z2rkOOg1npKDPf9hytBww5eHr8uxJoWoS8Nj2n36KAJ0bpxD
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 400
Assets/Scripts/ThirdParty/TalkingDataScripts/TDDemoScript.cs

@@ -1,400 +0,0 @@
-using UnityEngine;
-using System.Collections.Generic;
-
-public class TDDemoScript : MonoBehaviour
-{
-    private const int top = 100;
-    private const int left = 80;
-    private const int height = 60;
-    private const int spacing = 20;
-    private readonly int width = (Screen.width - (left * 2) - spacing) / 2;
-    private const int step = 80;
-    private string tdid;
-    private string oaid;
-
-    private void OnGUI()
-    {
-        int i = 0;
-        GUI.Box(new Rect(10, 10, Screen.width - 20, Screen.height - 20), "Demo Menu");
-
-        GUI.Label(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), tdid);
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "getTDID"))
-        {
-            tdid = TalkingDataSDK.GetDeviceId();
-        }
-
-#if UNITY_ANDROID
-        GUI.Label(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), oaid);
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "getOAID"))
-        {
-            oaid = TalkingDataSDK.GetOAID();
-        }
-#endif
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnPageBegin"))
-        {
-            TalkingDataSDK.OnPageBegin("home_page");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnPageEnd"))
-        {
-            TalkingDataSDK.OnPageEnd("home_page");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnReceiveDeepLink"))
-        {
-            TalkingDataSDK.OnReceiveDeepLink("https://www.talkingdata.com");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnRegister"))
-        {
-            TalkingDataProfile profile = TalkingDataProfile.CreateProfile();
-            profile.SetName("name01");
-            profile.SetType(TalkingDataProfileType.WEIXIN);
-            profile.SetGender(TalkingDataGender.MALE);
-            profile.SetAge(18);
-            profile.SetProperty1("property1");
-            profile.SetProperty2(2);
-            profile.SetProperty3(3.14);
-            profile.SetProperty4("property4");
-            profile.SetProperty5("property5");
-            profile.SetProperty6(0.618);
-            profile.SetProperty7("property7");
-            profile.SetProperty8("property8");
-            profile.SetProperty9(9.8);
-            profile.SetProperty10("property10");
-            Dictionary<string, object> eventValue = new Dictionary<string, object>
-            {
-                { "key", "value" }
-            };
-            TalkingDataSDK.OnRegister("user01", profile, "123456", eventValue);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnLogin"))
-        {
-            TalkingDataProfile profile = TalkingDataProfile.CreateProfile();
-            profile.SetName("name01");
-            profile.SetType(TalkingDataProfileType.WEIXIN);
-            profile.SetGender(TalkingDataGender.MALE);
-            profile.SetAge(18);
-            profile.SetProperty1("property1");
-            profile.SetProperty2(2);
-            profile.SetProperty3(3.14);
-            profile.SetProperty4("property4");
-            profile.SetProperty5("property5");
-            profile.SetProperty6(0.618);
-            profile.SetProperty7("property7");
-            profile.SetProperty8("property8");
-            profile.SetProperty9(9.8);
-            profile.SetProperty10("property10");
-            Dictionary<string, object> eventValue = new Dictionary<string, object>
-            {
-                { "key", "value" }
-            };
-            TalkingDataSDK.OnLogin("user01", profile, eventValue);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnProfileUpdate"))
-        {
-            TalkingDataProfile profile = TalkingDataProfile.CreateProfile();
-            profile.SetName("name01");
-            profile.SetType(TalkingDataProfileType.WEIXIN);
-            profile.SetGender(TalkingDataGender.MALE);
-            profile.SetAge(18);
-            profile.SetProperty1("property1");
-            profile.SetProperty2(2);
-            profile.SetProperty3(3.14);
-            profile.SetProperty4("property4");
-            profile.SetProperty5("property5");
-            profile.SetProperty6(0.618);
-            profile.SetProperty7("property7");
-            profile.SetProperty8("property8");
-            profile.SetProperty9(9.8);
-            profile.SetProperty10("property10");
-            TalkingDataSDK.OnProfileUpdate(profile);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnCreateCard"))
-        {
-            TalkingDataSDK.OnCreateCard("user01", "支付宝", "支付宝账号123456789");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnFavorite"))
-        {
-            Dictionary<string, object> eventValue = new Dictionary<string, object>
-            {
-                { "key", "value" }
-            };
-            TalkingDataSDK.OnFavorite("服装", "2019新款", eventValue);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnShare"))
-        {
-            Dictionary<string, object> eventValue = new Dictionary<string, object>
-            {
-                { "key", "value" }
-            };
-            TalkingDataSDK.OnShare("user01", "课程", eventValue);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnPunch"))
-        {
-            TalkingDataSDK.OnPunch("user01", "签到0023");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnSearch"))
-        {
-            TalkingDataSearch search = TalkingDataSearch.CreateSearch();
-            search.SetCategory("类型");
-            search.SetContent("内容");
-#if TD_RETAIL
-            search.SetItemId("商品ID");
-            search.SetItemLocationId("location12314");
-#endif
-#if TD_TOUR
-            search.SetDestination("目的地");
-            search.SetOrigin("出发地");
-            search.SetStartDate(1565176907309);
-            search.SetEndDate(1565176908309);
-#endif
-            TalkingDataSDK.OnSearch(search);
-        }
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_ONLINEEDU
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnContact"))
-        {
-            TalkingDataSDK.OnContact("user01", "联系平台内容");
-        }
-#endif
-
-#if TD_GAME || TD_TOUR || TD_ONLINEEDU || TD_READING || TD_OTHER
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnPay"))
-        {
-            TalkingDataSDK.OnPay("user01", "order01", 1077600, "CNY", "Apple Pay", "item01", 2);
-        }
-#endif
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_ONLINEEDU
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnChargeBack"))
-        {
-            TalkingDataSDK.OnChargeBack("user01", "order01", "7天无理由退货", "仅退款");
-        }
-#endif
-
-#if TD_FINANCE || TD_ONLINEEDU
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnReservation"))
-        {
-            TalkingDataSDK.OnReservation("user01", "AdTracking_123456", "借贷类", 12, "商品信息");
-        }
-#endif
-
-#if TD_RETAIL || TD_TOUR
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnBooking"))
-        {
-            TalkingDataSDK.OnBooking("user01", "002391", "电子", 123, "商品信息");
-        }
-#endif
-
-#if TD_RETAIL
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnViewItem"))
-        {
-            Dictionary<string, object> eventValue = new Dictionary<string, object>
-            {
-                { "key", "value" }
-            };
-            TalkingDataSDK.OnViewItem("A1660", "手机", "iPhone 7", 538800, eventValue);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnAddItemToShoppingCart"))
-        {
-            Dictionary<string, object> eventValue = new Dictionary<string, object>
-            {
-                { "key", "value" }
-            };
-            TalkingDataSDK.OnAddItemToShoppingCart("MLH12CH", "电脑", "MacBook Pro", 1388800, 1, eventValue);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnViewShoppingCart"))
-        {
-            TalkingDataShoppingCart shoppingCart = TalkingDataShoppingCart.CreateShoppingCart();
-            if (shoppingCart != null)
-            {
-                shoppingCart.AddItem("A1660", "手机", "iPhone 7", 538800, 2);
-                shoppingCart.AddItem("MLH12CH", "电脑", "MacBook Pro", 1388800, 1);
-                TalkingDataSDK.OnViewShoppingCart(shoppingCart);
-            }
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnPlaceOrder"))
-        {
-            TalkingDataOrder order = TalkingDataOrder.CreateOrder("order01", 2466400, "CNY");
-            order.AddItem("A1660", "手机", "iPhone 7", 538800, 2);
-            order.AddItem("MLH12CH", "电脑", "MacBook Pro", 1388800, 1);
-            Dictionary<string, object> eventValue = new Dictionary<string, object>
-            {
-                { "key", "value" }
-            };
-            TalkingDataSDK.OnPlaceOrder(order, "user01", eventValue);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnOrderPaySucc"))
-        {
-            TalkingDataOrder order = TalkingDataOrder.CreateOrder("order01", 2466400, "CNY");
-            order.AddItem("A1660", "手机", "iPhone 7", 538800, 2);
-            order.AddItem("MLH12CH", "电脑", "MacBook Pro", 1388800, 1);
-            TalkingDataSDK.OnOrderPaySucc(order, "AliPay", "user01");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnCancelOrder"))
-        {
-            TalkingDataOrder order = TalkingDataOrder.CreateOrder("order01", 2466400, "CNY");
-            order.AddItem("A1660", "手机", "iPhone 7", 538800, 2);
-            order.AddItem("MLH12CH", "电脑", "MacBook Pro", 1388800, 1);
-            TalkingDataSDK.OnCancelOrder(order);
-        }
-#endif
-
-#if TD_FINANCE
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnCredit"))
-        {
-            TalkingDataSDK.OnCredit("user01", 123456, "授信详情为......");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnTransaction"))
-        {
-            TalkingDataTransaction transaction = TalkingDataTransaction.CreateTransaction();
-            transaction.SetTransactionId("AdTracking_123456");
-            transaction.SetCategory("定期");
-            transaction.SetAmount(3222);
-            transaction.SetPersonA("张三");
-            transaction.SetPersonB("金融平台");
-            transaction.SetStartDate(1565176907309);
-            transaction.SetEndDate(1565176908309);
-            transaction.SetCurrencyType("CNY");
-            transaction.SetContent("交易详情为......");
-            TalkingDataSDK.OnTransaction("user01", transaction);
-        }
-#endif
-
-#if TD_GAME
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnCreateRole"))
-        {
-            TalkingDataSDK.OnCreateRole("role01");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnLevelPass"))
-        {
-            TalkingDataSDK.OnLevelPass("user01", "AdTracking_123456");
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnGuideFinished"))
-        {
-            TalkingDataSDK.OnGuideFinished("user01", "新手教程顺利通过");
-        }
-#endif
-
-#if TD_ONLINEEDU
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnLearn"))
-        {
-            TalkingDataSDK.OnLearn("user01", "成人教育第一节", 1501234567890, 20);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnPreviewFinished"))
-        {
-            TalkingDataSDK.OnPreviewFinished("user01", "基础课程试听结束");
-        }
-#endif
-
-#if TD_READING
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnRead"))
-        {
-            TalkingDataSDK.OnRead("user01", "西游记第一章", 1501234567890, 20);
-        }
-
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnFreeFinished"))
-        {
-            TalkingDataSDK.OnFreeFinished("user01", "免费章节阅读结束");
-        }
-#endif
-
-#if TD_GAME || TD_ONLINEEDU
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnAchievementUnlock"))
-        {
-            TalkingDataSDK.OnAchievementUnlock("user01", "AdTracking_123456");
-        }
-#endif
-
-#if TD_FINANCE || TD_TOUR || TD_OTHER
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnBrowse"))
-        {
-            TalkingDataSDK.OnBrowse("user01", "详情页page1", 1501234567890, 20);
-        }
-#endif
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_OTHER
-        if (GUI.Button(new Rect(left + i % 2 * (width + spacing), top + step * (i++ / 2), width, height), "OnTrialFinished"))
-        {
-            TalkingDataSDK.OnTrialFinished("user01", "试用体验结束");
-        }
-#endif
-
-        if (GUI.Button(new Rect(left, top + (step * i++), width, height), "OnEvent"))
-        {
-            Dictionary<string, object> dic = new Dictionary<string, object>
-            {
-                { "StringValue", "Pi" },
-                { "NumberValue", 3.14 }
-            };
-            Dictionary<string, object> eventValue = new Dictionary<string, object>
-            {
-                { "key", "value" }
-            };
-            TalkingDataSDK.OnEvent("action_id", dic, eventValue);
-        }
-    }
-
-    void Start()
-    {
-        Debug.Log("Start");
-        // TalkingDataSDK.SetVerboseLogDisable();
-        TalkingDataSDKConfig config = TalkingDataSDKConfig.CreateConfig();
-        config.SetIMEIAndMEIDEnabled(false)//不允许收集IMEI和MEID
-                .SetMACEnabled(false)//不允许收集MAC
-                .SetAppListEnabled(false)//不允许收集应用列表
-                .SetLocationEnabled(false)//不允许收集位置信息
-                .SetWifiEnabled(false);//不允许收集网络信息
-        TalkingDataSDK.SetConfig(config);
-        TalkingDataSDK.BackgroundSessionEnabled();
-        TalkingDataSDK.InitSDK("your_app_id", "your_channel_id", "your_custom_parameter");
-        TalkingDataSDK.StartA();
-    }
-
-    void Update()
-    {
-        if (Input.GetKey(KeyCode.Escape))
-        {
-            Application.Quit();
-        }
-    }
-
-    void OnDestroy()
-    {
-        Debug.Log("onDestroy");
-        TalkingDataSDK.OnPause();
-    }
-
-    void Awake()
-    {
-        Debug.Log("Awake");
-    }
-
-    void OnEnable()
-    {
-        Debug.Log("OnEnable");
-    }
-
-    void OnDisable()
-    {
-        Debug.Log("OnDisable");
-    }
-}

+ 0 - 11
Assets/Scripts/ThirdParty/TalkingDataScripts/TDDemoScript.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: WntOvSutVHptthMVwcnd70SVcWhij8L0SWaXhbK5fS9Qpk15L7OM04ovXLl6
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 71
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataOrder.cs

@@ -1,71 +0,0 @@
-using UnityEngine;
-
-
-#if TD_RETAIL
-public class TalkingDataOrder
-{
-#if UNITY_ANDROID
-    public AndroidJavaObject javaObj;
-#endif
-
-#if UNITY_IPHONE
-    private string orderId;
-    private int total;
-    private string currencyType;
-    private string items = "";
-#endif
-
-    public static TalkingDataOrder CreateOrder(string orderId, int total, string currencyType)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            TalkingDataOrder order = new TalkingDataOrder();
-#if UNITY_ANDROID
-            AndroidJavaClass javaClass = new AndroidJavaClass("com.tendcloud.tenddata.TalkingDataOrder");
-            order.javaObj = javaClass.CallStatic<AndroidJavaObject>("createOrder", orderId, total, currencyType);
-#endif
-#if UNITY_IPHONE
-            order.orderId = orderId;
-            order.total = total;
-            order.currencyType = currencyType;
-#endif
-            return order;
-        }
-        return null;
-    }
-
-    public TalkingDataOrder AddItem(string itemId, string category, string name, int unitPrice, int amount)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("addItem", itemId, category, name, unitPrice, amount);
-            }
-#endif
-#if UNITY_IPHONE
-            string item = "{\"itemId\":\"" + itemId + "\",\"category\":\"" + category + "\",\"name\":\"" + name + "\",\"unitPrice\":" + unitPrice + ",\"amount\":" + amount + "}";
-            if (items.Length > 0)
-            {
-                items += ",";
-            }
-            items += item;
-#endif
-        }
-        return this;
-    }
-
-#if UNITY_IPHONE
-    public override string ToString()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            string orderStr = "{\"orderId\":\"" + orderId + "\",\"total\":" + total + ",\"currencyType\":\"" + currencyType + "\",\"items\":[" + items + "]}";
-            return orderStr;
-        }
-        return null;
-    }
-#endif
-}
-#endif

+ 0 - 11
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataOrder.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: CSlMtS2pWnvStkMzeGxRcdWR+fhYoghk3PeEpXIHlvRSBwJJW4uZKPoWD+BZ
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 468
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataProfile.cs

@@ -1,468 +0,0 @@
-using UnityEngine;
-
-
-public enum TalkingDataProfileType
-{
-    ANONYMOUS   = 0,
-    REGISTERED  = 1,
-    SINA_WEIBO  = 2,
-    QQ          = 3,
-    QQ_WEIBO    = 4,
-    ND91        = 5,
-    WEIXIN      = 6,
-    TYPE1       = 11,
-    TYPE2       = 12,
-    TYPE3       = 13,
-    TYPE4       = 14,
-    TYPE5       = 15,
-    TYPE6       = 16,
-    TYPE7       = 17,
-    TYPE8       = 18,
-    TYPE9       = 19,
-    TYPE10      = 20
-}
-
-
-public enum TalkingDataGender
-{
-    UNKNOWN     = 0,
-    MALE        = 1,
-    FEMALE      = 2
-}
-
-
-public class TalkingDataProfile
-{
-#if UNITY_ANDROID
-    public AndroidJavaObject javaObj;
-#endif
-
-#if UNITY_IPHONE
-    private string name;
-    private TalkingDataProfileType type;
-    private TalkingDataGender gender;
-    private int age;
-    private object property1;
-    private object property2;
-    private object property3;
-    private object property4;
-    private object property5;
-    private object property6;
-    private object property7;
-    private object property8;
-    private object property9;
-    private object property10;
-#endif
-
-    public static TalkingDataProfile CreateProfile()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            TalkingDataProfile profile = new TalkingDataProfile();
-#if UNITY_ANDROID
-            AndroidJavaClass javaClass = new AndroidJavaClass("com.tendcloud.tenddata.TalkingDataProfile");
-            profile.javaObj = javaClass.CallStatic<AndroidJavaObject>("createProfile");
-#endif
-            return profile;
-        }
-        return null;
-    }
-
-    // 账户名称
-    public TalkingDataProfile SetName(string name)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setName", name);
-            }
-#endif
-#if UNITY_IPHONE
-            this.name = name;
-#endif
-        }
-        return this;
-    }
-
-    // 账户类型
-    public TalkingDataProfile SetType(TalkingDataProfileType type)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaClass enumClass = new AndroidJavaClass("com.tendcloud.tenddata.TalkingDataProfileType");
-                AndroidJavaObject typeObj = enumClass.CallStatic<AndroidJavaObject>("valueOf", type.ToString());
-                javaObj.Call<AndroidJavaObject>("setType", typeObj);
-            }
-#endif
-#if UNITY_IPHONE
-            this.type = type;
-#endif
-        }
-        return this;
-    }
-
-    // 性别
-    public TalkingDataProfile SetGender(TalkingDataGender gender)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaClass enumClass = new AndroidJavaClass("com.tendcloud.tenddata.TalkingDataGender");
-                AndroidJavaObject genderObj = enumClass.CallStatic<AndroidJavaObject>("valueOf", gender.ToString());
-                javaObj.Call<AndroidJavaObject>("setGender", genderObj);
-            }
-#endif
-#if UNITY_IPHONE
-            this.gender = gender;
-#endif
-        }
-        return this;
-    }
-
-    // 年龄
-    public TalkingDataProfile SetAge(int age)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setAge", age);
-            }
-#endif
-#if UNITY_IPHONE
-            this.age = age;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性1
-    public TalkingDataProfile SetProperty1(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty1", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property1 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性2
-    public TalkingDataProfile SetProperty2(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty2", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property2 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性3
-    public TalkingDataProfile SetProperty3(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty3", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property3 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性4
-    public TalkingDataProfile SetProperty4(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty4", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property4 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性5
-    public TalkingDataProfile SetProperty5(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty5", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property5 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性6
-    public TalkingDataProfile SetProperty6(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty6", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property6 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性7
-    public TalkingDataProfile SetProperty7(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty7", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property7 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性8
-    public TalkingDataProfile SetProperty8(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty8", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property8 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性9
-    public TalkingDataProfile SetProperty9(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty9", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property9 = property;
-#endif
-        }
-        return this;
-    }
-
-    // 用户属性10
-    public TalkingDataProfile SetProperty10(object property)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                AndroidJavaObject androidObject = AndroidJavaObjectFromObject(property);
-                javaObj.Call<AndroidJavaObject>("setProperty10", androidObject);
-            }
-#endif
-#if UNITY_IPHONE
-            this.property10 = property;
-#endif
-        }
-        return this;
-    }
-
-#if UNITY_ANDROID
-    private AndroidJavaObject AndroidJavaObjectFromObject(object parameter)
-    {
-        AndroidJavaObject androidObject = null;
-        if (parameter is string)
-        {
-            androidObject = new AndroidJavaObject("java.lang.String", parameter);
-        }
-        else if (parameter is byte || parameter is sbyte)
-        {
-            androidObject = new AndroidJavaObject("java.lang.Byte", parameter);
-        }
-        else if (parameter is short || parameter is ushort)
-        {
-            androidObject = new AndroidJavaObject("java.lang.Short", parameter);
-        }
-        else if (parameter is int || parameter is uint)
-        {
-            androidObject = new AndroidJavaObject("java.lang.Integer", parameter);
-        }
-        else if (parameter is long || parameter is ulong)
-        {
-            androidObject = new AndroidJavaObject("java.lang.Long", parameter);
-        }
-        else if (parameter is float)
-        {
-            androidObject = new AndroidJavaObject("java.lang.Float", parameter);
-        }
-        else if (parameter is double)
-        {
-            androidObject = new AndroidJavaObject("java.lang.Double", parameter);
-        }
-        return androidObject;
-    }
-#endif
-
-#if UNITY_IPHONE
-    public override string ToString()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            string profileStr = "{\"name\":\"" + name + "\""
-                              + ",\"type\":" + (int)type
-                              + ",\"gender\":" + (int)gender
-                              + ",\"age\":" + age;
-            if (property1 is string)
-            {
-                profileStr += ",\"property1\":\"" + property1 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property1\":" + property1;
-            }
-            if (property2 is string)
-            {
-                profileStr += ",\"property2\":\"" + property2 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property2\":" + property2;
-            }
-            if (property3 is string)
-            {
-                profileStr += ",\"property3\":\"" + property3 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property3\":" + property3;
-            }
-            if (property4 is string)
-            {
-                profileStr += ",\"property4\":\"" + property4 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property4\":" + property4;
-            }
-            if (property5 is string)
-            {
-                profileStr += ",\"property5\":\"" + property5 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property5\":" + property5;
-            }
-            if (property6 is string)
-            {
-                profileStr += ",\"property6\":\"" + property6 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property6\":" + property6;
-            }
-            if (property7 is string)
-            {
-                profileStr += ",\"property7\":\"" + property7 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property7\":" + property7;
-            }
-            if (property8 is string)
-            {
-                profileStr += ",\"property8\":\"" + property8 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property8\":" + property8;
-            }
-            if (property9 is string)
-            {
-                profileStr += ",\"property9\":\"" + property9 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property9\":" + property9;
-            }
-            if (property10 is string)
-            {
-                profileStr += ",\"property10\":\"" + property10 + "\"";
-            }
-            else
-            {
-                profileStr += ",\"property10\":" + property10;
-            }
-            profileStr += "}";
-            return profileStr;
-        }
-        return null;
-    }
-#endif
-}

+ 0 - 11
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataProfile.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: WnsZ4SmoVipELlyOjwAfMmTYo/CeBMP1I1BYiBLdoAgCS74hSysz7C0schwM
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 1089
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataSDK.cs

@@ -1,1089 +0,0 @@
-// version: 5.0.4
-
-using UnityEngine;
-using System.Collections.Generic;
-#if UNITY_ANDROID
-using System;
-#endif
-
-#if UNITY_IPHONE
-using System.Runtime.InteropServices;
-using System.Collections;
-#endif
-
-
-public static class TalkingDataSDK
-{
-#if UNITY_ANDROID
-    private static readonly string TALKINGDATA_CLASS = "com.tendcloud.tenddata.TalkingDataSDK";
-    private static AndroidJavaClass talkingdataClass;
-    private static AndroidJavaClass unityPlayerClass;
-#endif
-
-#if UNITY_IPHONE
-    [DllImport("__Internal")]
-    private static extern void TDInitSDK(string appId, string channelId, string custom);
-
-    [DllImport("__Internal")]
-    private static extern void TDStartA();
-
-    [DllImport("__Internal")]
-    private static extern void TDBackgroundSessionEnabled();
-
-    [DllImport("__Internal")]
-    private static extern string TDGetDeviceId();
-
-    [DllImport("__Internal")] 
-    private static extern void TDSetVerboseLogDisable();
-
-    [DllImport("__Internal")]
-    private static extern void TDSetLocation(double latitude, double longitude);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnPageBegin(string pageName);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnPageEnd(string pageName);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnReceiveDeepLink(string url);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnRegister(string profileId, string profileJson, string invitationCode, string eventValueJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnLogin(string profileId, string profileJson, string eventValueJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnProfileUpdate(string profileJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnCreateCard(string profileId, string method, string content);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnFavorite(string category, string content, string eventValueJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnShare(string profileId, string content, string eventValueJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnPunch(string profileId, string punchId);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnSearch(string searchJson);
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_ONLINEEDU
-    [DllImport("__Internal")]
-    private static extern void TDOnContact(string profileId, string content);
-#endif
-
-#if TD_GAME || TD_TOUR || TD_ONLINEEDU || TD_READING || TD_OTHER
-    [DllImport("__Internal")]
-    private static extern void TDOnPay(string profileId, string orderId, int amount, string currencyType, string paymentType, string itemId, int itemCount);
-#endif
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_ONLINEEDU
-    [DllImport("__Internal")]
-    private static extern void TDOnChargeBack(string profileId, string orderId, string reason, string type);
-#endif
-
-#if TD_FINANCE || TD_ONLINEEDU
-    [DllImport("__Internal")]
-    private static extern void TDOnReservation(string profileId, string reservationId, string category, int amount, string term);
-#endif
-
-#if TD_RETAIL || TD_TOUR
-    [DllImport("__Internal")]
-    private static extern void TDOnBooking(string profileId, string bookingId, string category, int amount, string content);
-#endif
-
-#if TD_RETAIL
-    [DllImport("__Internal")]
-    private static extern void TDOnViewItem(string itemId, string category, string name, int unitPrice, string eventValueJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnAddItemToShoppingCart(string item, string category, string name, int unitPrice, int amount, string eventValueJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnViewShoppingCart(string shoppingCartJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnPlaceOrder(string orderJson, string profileId, string eventValueJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnOrderPaySucc(string orderJson, string paymentType, string profileId);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnCancelOrder(string orderJson);
-#endif
-
-#if TD_FINANCE
-    [DllImport("__Internal")]
-    private static extern void TDOnCredit(string profileId, int amount, string content);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnTransaction(string profileId, string transactionJson);
-#endif
-
-#if TD_GAME
-    [DllImport("__Internal")]
-    private static extern void TDOnCreateRole(string name);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnLevelPass(string profileId, string levelId);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnGuideFinished(string profileId, string content);
-#endif
-
-#if TD_ONLINEEDU
-    [DllImport("__Internal")]
-    private static extern void TDOnLearn(string profileId, string course, long begin, int duration);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnPreviewFinished(string profileId, string content);
-#endif
-
-#if TD_READING
-    [DllImport("__Internal")]
-    private static extern void TDOnRead(string profileId, string book, long begin, int duration);
-
-    [DllImport("__Internal")]
-    private static extern void TDOnFreeFinished(string profileId, string content);
-#endif
-
-#if TD_GAME || TD_ONLINEEDU
-    [DllImport("__Internal")]
-    private static extern void TDOnAchievementUnlock(string profileId, string achievementId);
-#endif
-
-#if TD_FINANCE || TD_TOUR || TD_OTHER
-    [DllImport("__Internal")]
-    private static extern void TDOnBrowse(string profileId, string content, long begin, int duration);
-#endif
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_OTHER
-    [DllImport("__Internal")]
-    private static extern void TDOnTrialFinished(string profileId, string content);
-#endif
-
-    [DllImport("__Internal")]
-    private static extern void TDOnEvent(string eventId, string parameters, string eventValueJson);
-
-    [DllImport("__Internal")]
-    private static extern void TDSetGlobalKV(string key, string strVal, double numVal);
-
-    [DllImport("__Internal")]
-    private static extern void TDRemoveGlobalKV(string key);
-#endif
-
-#if UNITY_ANDROID
-    private static AndroidJavaObject GetCurrentActivity()
-    {
-        if (unityPlayerClass == null)
-        {
-            unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
-        }
-
-        AndroidJavaObject activity = unityPlayerClass.GetStatic<AndroidJavaObject>("currentActivity");
-        return activity;
-    }
-
-    private static AndroidJavaObject DictionaryToAndroidMap(Dictionary<string, object> parameters)
-    {
-        AndroidJavaObject map = null;
-        if (parameters != null && parameters.Count > 0)
-        {
-            int count = parameters.Count;
-            map = new AndroidJavaObject("java.util.HashMap", count);
-            IntPtr method_Put = AndroidJNIHelper.GetMethodID(map.GetRawClass(), "put",
-                "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
-            object[] args = new object[2];
-            foreach (KeyValuePair<string, object> kvp in parameters)
-            {
-                args[0] = new AndroidJavaObject("java.lang.String", kvp.Key);
-                args[1] = typeof(string).IsInstanceOfType(kvp.Value)
-                    ? new AndroidJavaObject("java.lang.String", kvp.Value)
-                    : new AndroidJavaObject("java.lang.Double", "" + kvp.Value);
-                AndroidJNI.CallObjectMethod(map.GetRawObject(), method_Put, AndroidJNIHelper.CreateJNIArgArray(args));
-            }
-        }
-
-        return map;
-    }
-#endif
-
-#if UNITY_IPHONE
-    private static string DictionaryToJSONString(Dictionary<string, object> parameters)
-    {
-        string json = null;
-        if (parameters != null && parameters.Count > 0)
-        {
-            json = "{";
-            foreach (KeyValuePair<string, object> kvp in parameters)
-            {
-                if (kvp.Value is string)
-                {
-                    json += "\"" + kvp.Key + "\":\"" + kvp.Value + "\",";
-                }
-                else
-                {
-                    try
-                    {
-                        double tmp = System.Convert.ToDouble(kvp.Value);
-                        json += "\"" + kvp.Key + "\":" + tmp + ",";
-                    }
-                    catch (System.Exception)
-                    {
-                    }
-                }
-            }
-            json = json.TrimEnd(',');
-            json += "}";
-        }
-        return json;
-    }
-#endif
-
-    public static void SetConfig(TalkingDataSDKConfig config)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass == null)
-            {
-                talkingdataClass = new AndroidJavaClass(TALKINGDATA_CLASS);
-            }
-
-            talkingdataClass.CallStatic("setConfig", config.javaObj);
-#endif
-        }
-    }
-
-    public static void InitSDK(string appId, string channelId, string custom)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            Debug.Log("TalkingData Unity SDK.");
-#if UNITY_ANDROID
-            using (AndroidJavaClass dz = new AndroidJavaClass("com.tendcloud.tenddata.dz"))
-            {
-                dz.SetStatic("a", 2);
-            }
-
-            if (talkingdataClass == null)
-            {
-                talkingdataClass = new AndroidJavaClass(TALKINGDATA_CLASS);
-            }
-
-            AndroidJavaObject activity = GetCurrentActivity();
-            talkingdataClass.CallStatic("initSDK", activity, appId, channelId, custom);
-#endif
-#if UNITY_IPHONE
-            TDInitSDK(appId, channelId, custom);
-#endif
-        }
-    }
-
-    public static void StartA()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject activity = GetCurrentActivity();
-                talkingdataClass.CallStatic("startA", activity);
-                talkingdataClass.CallStatic("onResume", activity);
-            }
-#endif
-#if UNITY_IPHONE
-            TDStartA();
-#endif
-        }
-    }
-
-    public static void OnPause()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onPause", GetCurrentActivity());
-            }
-#endif
-        }
-    }
-
-    public static void BackgroundSessionEnabled()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_IPHONE
-            TDBackgroundSessionEnabled();
-#endif
-        }
-    }
-
-    private static string deviceId = null;
-
-    public static string GetDeviceId()
-    {
-        if (deviceId == null && Application.platform != RuntimePlatform.OSXEditor &&
-            Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass == null)
-            {
-                talkingdataClass = new AndroidJavaClass(TALKINGDATA_CLASS);
-            }
-
-            deviceId = talkingdataClass.CallStatic<string>("getDeviceId", GetCurrentActivity());
-#endif
-#if UNITY_IPHONE
-            deviceId = TDGetDeviceId();
-#endif
-        }
-
-        return deviceId;
-    }
-
-    private static string oaid = null;
-
-    public static string GetOAID()
-    {
-        if (oaid == null && Application.platform != RuntimePlatform.OSXEditor &&
-            Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass == null)
-            {
-                talkingdataClass = new AndroidJavaClass(TALKINGDATA_CLASS);
-            }
-
-            oaid = talkingdataClass.CallStatic<string>("getOAID", GetCurrentActivity());
-#endif
-        }
-
-        return oaid;
-    }
-
-    public static void SetVerboseLogDisable()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass == null)
-            {
-                talkingdataClass = new AndroidJavaClass(TALKINGDATA_CLASS);
-            }
-
-            talkingdataClass.CallStatic("setVerboseLogDisable");
-#endif
-#if UNITY_IPHONE
-            TDSetVerboseLogDisable();
-#endif
-        }
-    }
-
-    public static void SetLocation(double latitude, double longitude)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_IPHONE
-            TDSetLocation(latitude, longitude);
-#endif
-        }
-    }
-
-    public static void OnPageBegin(string pageName)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onPageBegin", GetCurrentActivity(), pageName);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnPageBegin(pageName);
-#endif
-        }
-    }
-
-    public static void OnPageEnd(string pageName)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onPageEnd", GetCurrentActivity(), pageName);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnPageEnd(pageName);
-#endif
-        }
-    }
-
-    public static void OnReceiveDeepLink(string url)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onReceiveDeepLink", url);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnReceiveDeepLink(url);
-#endif
-        }
-    }
-
-    public static void OnRegister(string profileId, TalkingDataProfile profile, string invitationCode,
-        Dictionary<string, object> eventValue)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject eventValueMap = DictionaryToAndroidMap(eventValue);
-                talkingdataClass.CallStatic("onRegister", profileId, profile.javaObj, invitationCode, eventValueMap);
-                if (eventValueMap != null)
-                {
-                    eventValueMap.Dispose();
-                }
-            }
-#endif
-#if UNITY_IPHONE
-            string eventValueJson = DictionaryToJSONString(eventValue);
-            TDOnRegister(profileId, profile.ToString(), invitationCode, eventValueJson);
-#endif
-        }
-    }
-
-    public static void OnLogin(string profileId, TalkingDataProfile profile, Dictionary<string, object> eventValue)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject eventValueMap = DictionaryToAndroidMap(eventValue);
-                talkingdataClass.CallStatic("onLogin", profileId, profile.javaObj, eventValueMap);
-                if (eventValueMap != null)
-                {
-                    eventValueMap.Dispose();
-                }
-            }
-#endif
-#if UNITY_IPHONE
-            string eventValueJson = DictionaryToJSONString(eventValue);
-            TDOnLogin(profileId, profile.ToString(), eventValueJson);
-#endif
-        }
-    }
-
-    public static void OnProfileUpdate(TalkingDataProfile profile)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onProfileUpdate", profile.javaObj);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnProfileUpdate(profile.ToString());
-#endif
-        }
-    }
-
-    public static void OnCreateCard(string profileId, string method, string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onCreateCard", profileId, method, content);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnCreateCard(profileId, method, content);
-#endif
-        }
-    }
-
-    public static void OnFavorite(string category, string content, Dictionary<string, object> eventValue)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject eventValueMap = DictionaryToAndroidMap(eventValue);
-                talkingdataClass.CallStatic("onFavorite", category, content, eventValueMap);
-                if (eventValueMap != null)
-                {
-                    eventValueMap.Dispose();
-                }
-            }
-#endif
-#if UNITY_IPHONE
-            string eventValueJson = DictionaryToJSONString(eventValue);
-            TDOnFavorite(category, content, eventValueJson);
-#endif
-        }
-    }
-
-    public static void OnShare(string profileId, string content, Dictionary<string, object> eventValue)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject eventValueMap = DictionaryToAndroidMap(eventValue);
-                talkingdataClass.CallStatic("onShare", profileId, content, eventValueMap);
-                if (eventValueMap != null)
-                {
-                    eventValueMap.Dispose();
-                }
-            }
-#endif
-#if UNITY_IPHONE
-            string eventValueJson = DictionaryToJSONString(eventValue);
-            TDOnShare(profileId, content, eventValueJson);
-#endif
-        }
-    }
-
-    public static void OnPunch(string profileId, string punchId)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onPunch", profileId, punchId);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnPunch(profileId, punchId);
-#endif
-        }
-    }
-
-    public static void OnSearch(TalkingDataSearch search)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onSearch", search.javaObj);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnSearch(search.ToString());
-#endif
-        }
-    }
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_ONLINEEDU
-    public static void OnContact(string profileId, string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onContact", profileId, content);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnContact(profileId, content);
-#endif
-        }
-    }
-#endif
-
-#if TD_GAME || TD_TOUR || TD_ONLINEEDU || TD_READING || TD_OTHER
-    public static void OnPay(string profileId, string orderId, int amount, string currencyType, string paymentType, string itemId, int itemCount)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onPay", profileId, orderId, amount, currencyType, paymentType, itemId, itemCount);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnPay(profileId, orderId, amount, currencyType, paymentType, itemId, itemCount);
-#endif
-        }
-    }
-#endif
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_ONLINEEDU
-    public static void OnChargeBack(string profileId, string orderId, string reason, string type)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onChargeBack", profileId, orderId, reason, type);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnChargeBack(profileId, orderId, reason, type);
-#endif
-        }
-    }
-#endif
-
-#if TD_FINANCE || TD_ONLINEEDU
-    public static void OnReservation(string profileId, string reservationId, string category, int amount, string term)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onReservation", profileId, reservationId, category, amount, term);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnReservation(profileId, reservationId, category, amount, term);
-#endif
-        }
-    }
-#endif
-
-#if TD_RETAIL || TD_TOUR
-    public static void OnBooking(string profileId, string bookingId, string category, int amount, string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onBooking", profileId, bookingId, category, amount, content);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnBooking(profileId, bookingId, category, amount, content);
-#endif
-        }
-    }
-#endif
-
-#if TD_RETAIL
-    public static void OnViewItem(string itemId, string category, string name, int unitPrice, Dictionary<string, object> eventValue)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject eventValueMap = DictionaryToAndroidMap(eventValue);
-                talkingdataClass.CallStatic("onViewItem", itemId, category, name, unitPrice, eventValueMap);
-                if (eventValueMap != null)
-                {
-                    eventValueMap.Dispose();
-                }
-            }
-#endif
-#if UNITY_IPHONE
-            string eventValueJson = DictionaryToJSONString(eventValue);
-            TDOnViewItem(itemId, category, name, unitPrice, eventValueJson);
-#endif
-        }
-    }
-
-    public static void OnAddItemToShoppingCart(string itemId, string category, string name, int unitPrice, int amount, Dictionary<string, object> eventValue)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject eventValueMap = DictionaryToAndroidMap(eventValue);
-                talkingdataClass.CallStatic("onAddItemToShoppingCart", itemId, category, name, unitPrice, amount, eventValueMap);
-                if (eventValueMap != null)
-                {
-                    eventValueMap.Dispose();
-                }
-            }
-#endif
-#if UNITY_IPHONE
-            string eventValueJson = DictionaryToJSONString(eventValue);
-            TDOnAddItemToShoppingCart(itemId, category, name, unitPrice, amount, eventValueJson);
-#endif
-        }
-    }
-
-    public static void OnViewShoppingCart(TalkingDataShoppingCart shoppingCart)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onViewShoppingCart", shoppingCart.javaObj);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnViewShoppingCart(shoppingCart.ToString());
-#endif
-        }
-    }
-
-    public static void OnPlaceOrder(TalkingDataOrder order, string profileId, Dictionary<string, object> eventValue)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject eventValueMap = DictionaryToAndroidMap(eventValue);
-                talkingdataClass.CallStatic("onPlaceOrder", order.javaObj, profileId, eventValueMap);
-                if (eventValueMap != null)
-                {
-                    eventValueMap.Dispose();
-                }
-            }
-#endif
-#if UNITY_IPHONE
-            string eventValueJson = DictionaryToJSONString(eventValue);
-            TDOnPlaceOrder(order.ToString(), profileId, eventValueJson);
-#endif
-        }
-    }
-
-    public static void OnOrderPaySucc(TalkingDataOrder order, string paymentType, string profileId)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onOrderPaySucc", order.javaObj, paymentType, profileId);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnOrderPaySucc(order.ToString(), paymentType, profileId);
-#endif
-        }
-    }
-
-    public static void OnCancelOrder(TalkingDataOrder order)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onCancelOrder", order.javaObj);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnCancelOrder(order.ToString());
-#endif
-        }
-    }
-#endif
-
-#if TD_FINANCE
-    public static void OnCredit(string profileId, int amount, string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onCredit", profileId, amount, content);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnCredit(profileId, amount, content);
-#endif
-        }
-    }
-
-    public static void OnTransaction(string profileId, TalkingDataTransaction transaction)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onTransaction", profileId, transaction.javaObj);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnTransaction(profileId, transaction.ToString());
-#endif
-        }
-    }
-#endif
-
-#if TD_GAME
-    public static void OnCreateRole(string name)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onCreateRole", name);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnCreateRole(name);
-#endif
-        }
-    }
-
-    public static void OnLevelPass(string profileId, string levelId)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onLevelPass", profileId, levelId);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnLevelPass(profileId, levelId);
-#endif
-        }
-    }
-
-    public static void OnGuideFinished(string profileId, string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onGuideFinished", profileId, content);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnGuideFinished(profileId, content);
-#endif
-        }
-    }
-#endif
-
-#if TD_ONLINEEDU
-    public static void OnLearn(string profileId, string course, long begin, int duration)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onLearn", profileId, course, begin, duration);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnLearn(profileId, course, begin, duration);
-#endif
-        }
-    }
-
-    public static void OnPreviewFinished(string profileId, string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onPreviewFinished", profileId, content);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnPreviewFinished(profileId, content);
-#endif
-        }
-    }
-#endif
-
-#if TD_READING
-    public static void OnRead(string profileId, string book, long begin, int duration)
-     {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onRead", profileId, book, begin, duration);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnRead(profileId, book, begin, duration);
-#endif
-        }
-    }
-
-    public static void OnFreeFinished(string profileId, string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onFreeFinished", profileId, content);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnFreeFinished(profileId, content);
-#endif
-        }
-    }
-#endif
-
-#if TD_GAME || TD_ONLINEEDU
-    public static void OnAchievementUnlock(string profileId, string achievementId)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onAchievementUnlock", profileId, achievementId);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnAchievementUnlock(profileId, achievementId);
-#endif
-        }
-    }
-#endif
-
-#if TD_FINANCE || TD_TOUR || TD_OTHER
-    public static void OnBrowse(string profileId, string content, long begin, int duration)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onBrowse", profileId, content, begin, duration);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnBrowse(profileId, content, begin, duration);
-#endif
-        }
-    }
-#endif
-
-#if TD_RETAIL || TD_FINANCE || TD_TOUR || TD_OTHER
-    public static void OnTrialFinished(string profileId, string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("onTrialFinished", profileId, content);
-            }
-#endif
-#if UNITY_IPHONE
-            TDOnTrialFinished(profileId, content);
-#endif
-        }
-    }
-#endif
-
-    public static void OnEvent(string eventId, Dictionary<string, object> parameters,
-        Dictionary<string, object> eventValue)
-    {
-        if (talkingdataClass == null)
-            return;
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject parametersMap = DictionaryToAndroidMap(parameters);
-                AndroidJavaObject eventValueMap = DictionaryToAndroidMap(eventValue);
-                talkingdataClass.CallStatic("onEvent", GetCurrentActivity(), eventId, parametersMap, eventValueMap);
-                if (parametersMap != null)
-                {
-                    parametersMap.Dispose();
-                }
-
-                if (eventValueMap != null)
-                {
-                    eventValueMap.Dispose();
-                }
-            }
-#endif
-#if UNITY_IPHONE
-            string parametersJson = DictionaryToJSONString(parameters);
-            string eventValueJson = DictionaryToJSONString(eventValue);
-            TDOnEvent(eventId, parametersJson, eventValueJson);
-#endif
-        }
-    }
-    
-
-    public static void SetGlobalKV(string key, object val)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                AndroidJavaObject valObject = typeof(string).IsInstanceOfType(val)
-                    ? new AndroidJavaObject("java.lang.String", val)
-                    : new AndroidJavaObject("java.lang.Double", "" + val);
-                talkingdataClass.CallStatic("setGlobalKV", key, valObject);
-            }
-#endif
-#if UNITY_IPHONE
-            if (val is string)
-            {
-                string tmp = System.Convert.ToString(val);
-                TDSetGlobalKV(key, tmp, 0);
-            }
-            else
-            {
-                double tmp = System.Convert.ToDouble(val);
-                TDSetGlobalKV(key, null, tmp);
-            }
-#endif
-        }
-    }
-
-    public static void RemoveGlobalKV(string key)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (talkingdataClass != null)
-            {
-                talkingdataClass.CallStatic("removeGlobalKV", key);
-            }
-#endif
-#if UNITY_IPHONE
-            TDRemoveGlobalKV(key);
-#endif
-        }
-    }
-}

+ 0 - 11
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataSDK.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: CH9OsH6kUnN53Bo8dS2tEdORBWShDjUiXAGnyZTxnvGuXH/OhEVII2XPgkHN
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 80
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataSDKConfig.cs

@@ -1,80 +0,0 @@
-using UnityEngine;
-
-
-public class TalkingDataSDKConfig
-{
-    public AndroidJavaObject javaObj;
-
-    public static TalkingDataSDKConfig CreateConfig()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            TalkingDataSDKConfig config = new TalkingDataSDKConfig();
-#if UNITY_ANDROID
-            config.javaObj = new AndroidJavaObject("com.tendcloud.tenddata.TalkingDataSDKConfig");
-#endif
-            return config;
-        }
-        return null;
-    }
-
-    public TalkingDataSDKConfig SetIMEIAndMEIDEnabled(bool enabled)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            javaObj.Call<AndroidJavaObject>("setIMEIAndMEIDEnabled", enabled);
-#endif
-            return this;
-        }
-        return null;
-    }
-
-    public TalkingDataSDKConfig SetMACEnabled(bool enabled)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            javaObj.Call<AndroidJavaObject>("setMACEnabled", enabled);
-#endif
-            return this;
-        }
-        return null;
-    }
-
-    public TalkingDataSDKConfig SetAppListEnabled(bool enabled)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            javaObj.Call<AndroidJavaObject>("setAppListEnabled", enabled);
-#endif
-            return this;
-        }
-        return null;
-    }
-
-    public TalkingDataSDKConfig SetLocationEnabled(bool enabled)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            javaObj.Call<AndroidJavaObject>("setLocationEnabled", enabled);
-#endif
-            return this;
-        }
-        return null;
-    }
-
-    public TalkingDataSDKConfig SetWifiEnabled(bool enabled)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            javaObj.Call<AndroidJavaObject>("setWifiEnabled", enabled);
-#endif
-            return this;
-        }
-        return null;
-    }
-}

+ 0 - 11
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataSDKConfig.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: WXtL5CmrBn6b7K/dXRdlliGWWHvMednLd2Hv9KXBkuCi+AfQp7huN8o2ora6
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 210
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataSearch.cs

@@ -1,210 +0,0 @@
-using UnityEngine;
-
-
-public class TalkingDataSearch
-{
-#if UNITY_ANDROID
-    public AndroidJavaObject javaObj;
-#endif
-
-#if UNITY_IPHONE
-    private string category;
-    private string content;
-#if TD_RETAIL
-    private string itemId;
-    private string itemLocationId;
-#endif
-#if TD_TOUR
-    private string destination;
-    private string origin;
-    private long startDate;
-    private long endDate;
-#endif
-#endif
-
-    public static TalkingDataSearch CreateSearch()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            TalkingDataSearch search = new TalkingDataSearch();
-#if UNITY_ANDROID
-            AndroidJavaClass javaClass = new AndroidJavaClass("com.tendcloud.tenddata.TalkingDataSearch");
-            search.javaObj = javaClass.CallStatic<AndroidJavaObject>("createSearch");
-#endif
-            return search;
-        }
-        return null;
-    }
-
-    // 搜索分类
-    public TalkingDataSearch SetCategory(string category)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setCategory", category);
-            }
-#endif
-#if UNITY_IPHONE
-            this.category = category;
-#endif
-        }
-        return this;
-    }
-
-    // 搜索内容
-    public TalkingDataSearch SetContent(string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setContent", content);
-            }
-#endif
-#if UNITY_IPHONE
-            this.content = content;
-#endif
-        }
-        return this;
-    }
-
-#if TD_RETAIL
-    // 商品 ID(eg.酒店/汽车);至多64字符,支持数字+字母
-    public TalkingDataSearch SetItemId(string itemId)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setItemId", itemId);
-            }
-#endif
-#if UNITY_IPHONE
-            this.itemId = itemId;
-#endif
-        }
-        return this;
-    }
-
-    // 商品位置 ID(eg.求职招聘/教育行业);至多64字符,支持数字+字母
-    public TalkingDataSearch SetItemLocationId(string itemLocationId)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setItemLocationId", itemLocationId);
-            }
-#endif
-#if UNITY_IPHONE
-            this.itemLocationId = itemLocationId;
-#endif
-        }
-        return this;
-    }
-#endif
-
-#if TD_TOUR
-    // 目的地城市 ID;至多64字符,支持数字+字母
-    public TalkingDataSearch SetDestination(string destination)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setDestination", destination);
-            }
-#endif
-#if UNITY_IPHONE
-            this.destination = destination;
-#endif
-        }
-        return this;
-    }
-
-    // 出发地城市 ID;至多64字符,支持数字+字母
-    public TalkingDataSearch SetOrigin(string origin)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setOrigin", origin);
-            }
-#endif
-#if UNITY_IPHONE
-            this.origin = origin;
-#endif
-        }
-        return this;
-    }
-
-    // 业务事件起始日期(eg.航班出发日期)
-    public TalkingDataSearch SetStartDate(long startDate)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setStartDate", startDate);
-            }
-#endif
-#if UNITY_IPHONE
-            this.startDate = startDate;
-#endif
-        }
-        return this;
-    }
-
-    // 业务事件截止日期(eg.航班返程日期)
-    public TalkingDataSearch SetEndDate(long endDate)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setEndDate", endDate);
-            }
-#endif
-#if UNITY_IPHONE
-            this.endDate = endDate;
-#endif
-        }
-        return this;
-    }
-#endif
-
-#if UNITY_IPHONE
-    public override string ToString()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            string searchStr = "{\"category\":\"" + category + "\""
-                             + ",\"content\":\"" + content + "\""
-#if TD_RETAIL
-                             + ",\"itemId\":\"" + itemId + "\""
-                             + ",\"itemLocationId\":\"" + itemLocationId + "\""
-#endif
-#if TD_TOUR
-                             + ",\"destination\":\"" + destination + "\""
-                             + ",\"origin\":\"" + origin + "\""
-                             + ",\"startDate\":" + startDate
-                             + ",\"endDate\":" + endDate
-#endif
-                             + "}";
-            return searchStr;
-        }
-        return null;
-    }
-#endif
-}

+ 0 - 11
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataSearch.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: WXJNt3n8VCi/Y8BcyJD1D4QxcgOFoqHzR6elP/aiv5liSEs56XuwlO3+oe5K
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 63
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataShoppingCart.cs

@@ -1,63 +0,0 @@
-using UnityEngine;
-
-
-#if TD_RETAIL
-public class TalkingDataShoppingCart
-{
-#if UNITY_ANDROID
-    public AndroidJavaObject javaObj;
-#endif
-
-#if UNITY_IPHONE
-    private string items = "";
-#endif
-
-    public static TalkingDataShoppingCart CreateShoppingCart()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            TalkingDataShoppingCart shoppingCart = new TalkingDataShoppingCart();
-#if UNITY_ANDROID
-            AndroidJavaClass javaClass = new AndroidJavaClass("com.tendcloud.tenddata.TalkingDataShoppingCart");
-            shoppingCart.javaObj = javaClass.CallStatic<AndroidJavaObject>("createShoppingCart");
-#endif
-            return shoppingCart;
-        }
-        return null;
-    }
-
-    public TalkingDataShoppingCart AddItem(string itemId, string category, string name, int unitPrice, int amount)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("addItem", itemId, category, name, unitPrice, amount);
-            }
-#endif
-#if UNITY_IPHONE
-            string item = "{\"itemId\":\"" + itemId + "\",\"category\":\"" + category + "\",\"name\":\"" + name + "\",\"unitPrice\":" + unitPrice + ",\"amount\":" + amount + "}";
-            if (items.Length > 0)
-            {
-                items += ",";
-            }
-            items += item;
-#endif
-        }
-        return this;
-    }
-
-#if UNITY_IPHONE
-    public override string ToString()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            string orderStr = "{\"items\":[" + items + "]}";
-            return orderStr;
-        }
-        return null;
-    }
-#endif
-}
-#endif

+ 0 - 11
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataShoppingCart.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: DShL4S2kAS73tH5SOApmSCIaDTpHPxDtpmPSdAcX7oZn6Mx1SVXhD0b0W4J0
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 220
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataTransaction.cs

@@ -1,220 +0,0 @@
-using UnityEngine;
-
-
-#if TD_FINANCE
-public class TalkingDataTransaction
-{
-#if UNITY_ANDROID
-    public AndroidJavaObject javaObj;
-#endif
-
-#if UNITY_IPHONE
-    private string transactionId;
-    private string category;
-    private int amount;
-    private string personA;
-    private string personB;
-    private long startDate;
-    private long endDate;
-    private string currencyType;
-    private string content;
-#endif
-
-    public static TalkingDataTransaction CreateTransaction()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            TalkingDataTransaction transaction = new TalkingDataTransaction();
-#if UNITY_ANDROID
-            AndroidJavaClass javaClass = new AndroidJavaClass("com.tendcloud.tenddata.TalkingDataTransaction");
-            transaction.javaObj = javaClass.CallStatic<AndroidJavaObject>("createTransaction");
-#endif
-            return transaction;
-        }
-        return null;
-    }
-
-    // 交易ID
-    public TalkingDataTransaction SetTransactionId(string transactionId)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setTransactionId", transactionId);
-            }
-#endif
-#if UNITY_IPHONE
-            this.transactionId = transactionId;
-#endif
-        }
-        return this;
-    }
-
-    // 交易分类
-    public TalkingDataTransaction SetCategory(string category)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setCategory", category);
-            }
-#endif
-#if UNITY_IPHONE
-            this.category = category;
-#endif
-        }
-        return this;
-    }
-
-    // 交易额
-    public TalkingDataTransaction SetAmount(int amount)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setAmount", amount);
-            }
-#endif
-#if UNITY_IPHONE
-            this.amount = amount;
-#endif
-        }
-        return this;
-    }
-
-    // 交易甲方
-    public TalkingDataTransaction SetPersonA(string personA)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setPersonA", personA);
-            }
-#endif
-#if UNITY_IPHONE
-            this.personA = personA;
-#endif
-        }
-        return this;
-    }
-
-    // 交易乙方
-    public TalkingDataTransaction SetPersonB(string personB)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setPersonB", personB);
-            }
-#endif
-#if UNITY_IPHONE
-            this.personB = personB;
-#endif
-        }
-        return this;
-    }
-
-    // 交易起始Unix时间戳。单位:毫秒
-    public TalkingDataTransaction SetStartDate(long startDate)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setStartDate", startDate);
-            }
-#endif
-#if UNITY_IPHONE
-            this.startDate = startDate;
-#endif
-        }
-        return this;
-    }
-
-    // 交易终止Unix时间戳。单位:毫秒
-    public TalkingDataTransaction SetEndDate(long endDate)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setEndDate", endDate);
-            }
-#endif
-#if UNITY_IPHONE
-            this.endDate = endDate;
-#endif
-        }
-        return this;
-    }
-
-    // 货币类型
-    public TalkingDataTransaction SetCurrencyType(string currencyType)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setCurrencyType", currencyType);
-            }
-#endif
-#if UNITY_IPHONE
-            this.currencyType = currencyType;
-#endif
-        }
-        return this;
-    }
-
-    // 交易详情
-    public TalkingDataTransaction SetContent(string content)
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-#if UNITY_ANDROID
-            if (javaObj != null)
-            {
-                javaObj.Call<AndroidJavaObject>("setContent", content);
-            }
-#endif
-#if UNITY_IPHONE
-            this.content = content;
-#endif
-        }
-        return this;
-    }
-
-#if UNITY_IPHONE
-    public override string ToString()
-    {
-        if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
-        {
-            string transactionStr = "{\"transactionId\":\"" + transactionId + "\""
-                                  + ",\"category\":\"" + category + "\""
-                                  + ",\"amount\":" + amount
-                                  + ",\"personA\":\"" + personA + "\""
-                                  + ",\"personB\":\"" + personB + "\""
-                                  + ",\"startDate\":" + startDate
-                                  + ",\"endDate\":" + endDate
-                                  + ",\"currencyType\":\"" + currencyType + "\""
-                                  + ",\"content\":\"" + content + "\""
-                                  + "}";
-            return transactionStr;
-        }
-        return null;
-    }
-#endif
-}
-#endif

+ 0 - 11
Assets/Scripts/ThirdParty/TalkingDataScripts/TalkingDataTransaction.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: Bi8dvCyvVy5dVTCHE6ZvgxXMWE8Mw7Lqin3HmXqMWWu5Wmqq2iYJZ+h2l7if
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: