wangguan
2020-11-04 2ae9edd5bfd8b8baabb8cd995485f9ade4faebc9
Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs
@@ -18,16 +18,17 @@
    // Start is called before the first frame update
    void Start()
    {
        GA_SDK_Manager.Ins.SDKInit(ChannelID.Gm.ToString());
        GA_SDK_Manager.Ins.Statistics(1);//成功加载登陆界面的人数
        TDAA_SDKManager.Ins.SDKInit(ChannelID.Gm.ToString());
        TDAA_SDKManager.Ins.Statistics(1);//成功加载登陆界面的人数
        isLogining = false;
        transform.Find("Panel/Button").GetComponent<Button>().onClick.AddListener(OnClickLoginBtn);
        transform.Find("Panel/Button (1)").GetComponent<Button>().onClick.AddListener(OnClickResetBtn);
        if (Application.platform == RuntimePlatform.Android)
        {
            //GetetDeviceIMEI();//获取安卓手机IMEI
            imei0 = GA_SDK_Manager.Ins.GetDeviceId();//使用设备ID
            imei0 = TDAA_SDKManager.Ins.GetDeviceId();//使用设备ID
        }
        else if (Application.platform == RuntimePlatform.WindowsEditor)
        {
@@ -69,11 +70,29 @@
    #endregion
    private void OnClickResetBtn()
    {
        Debug.LogError("清空了所有数据");
        PlayerPrefs.DeleteAll();
        TDAA_SDKManager.Ins.Reset();
    }
    private void OnClickLoginBtn()
    {
        LoginRequest();
        GA_SDK_Manager.Ins.Statistics(2);//埋点
        if (!isLogining)
        {
            AudioSourceManager.Ins.Play(AudioEnum.UI);
            TDAA_SDKManager.Ins.Statistics(2);//埋点
            //StartCoroutine(loginMy());
            StartCoroutine(LoadScene());
        }else{
        }
        //TDAA_SDKManager.Ins.Statistics(2);//埋点
        //LoginRequest();
    }
    /// <summary>
@@ -89,8 +108,8 @@
            {
                Debug.Log("编辑器直接登录");
                GA_SDK_Manager.Ins.Login(imei0);
                GA_SDK_Manager.Ins.Statistics(3);//埋点
                //TDAA_SDKManager.Ins.Login();
                //TDAA_SDKManager.Ins.Statistics(3);//埋点
                //StartCoroutine(loginMy());
                StartCoroutine(LoadScene());
@@ -180,8 +199,8 @@
            Debug.Log("--------------------- 登录成功 ---------------------");
            //UserDataMsg userData = login.Userdata;
            GA_SDK_Manager.Ins.Login(imei0);
            GA_SDK_Manager.Ins.Statistics(3);//埋点
            //TDAA_SDKManager.Ins.Login();
            //TDAA_SDKManager.Ins.Statistics(3);//埋点
            //StartCoroutine(loginMy());
            StartCoroutine(LoadScene());