Beispiel #1
0
    public void onClickOK()
    {
        VersionInfo versionInfo = ApkVersionConfig.getInstance().getDataById(PlatformHelper.GetChannelName());

        if (versionInfo != null)
        {
#if UNITY_ANDROID
            PlatformHelper.DownApk(versionInfo.url);
#endif
        }
    }
 public static void onApkVerisionIsLow()
 {
     if (OtherData.s_channelName.CompareTo("ios") != 0)
     {
         PlatformHelper.DownApk();
         GameObject go = GameObject.Find("NetErrorPanel(Clone)");
         if (go != null)
         {
             GameObject.Destroy(go);
         }
     }
     else
     {
         NetErrorPanelScript.getInstance().Show();
         NetErrorPanelScript.getInstance().setOnClickButton(onApkVerisionIsLow);
         NetErrorPanelScript.getInstance().setContentText("您的客户端版本过低,请更新到最新版本。");
     }
 }
    public void onApkVerisionIsLow()
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("LoginScript_hotfix", "onApkVerisionIsLow"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.LoginScript_hotfix", "onApkVerisionIsLow", null, null);
            return;
        }

#if UNITY_ANDROID
        PlatformHelper.DownApk();
        GameObject go = GameObject.Find("NetErrorPanel(Clone)");
        if (go != null)
        {
            Destroy(go);
        }
#else
        NetErrorPanelScript.getInstance().Show();
        NetErrorPanelScript.getInstance().setOnClickButton(onApkVerisionIsLow);
        NetErrorPanelScript.getInstance().setContentText("您的客户端版本过低,请更新到最新版本。");
#endif
    }