Пример #1
0
    public static void GetAssetVersionFile()
    {
        Debug.LogFormat("开始获取资源版本文件:时间 {0}", DateTime.Now);
        var remoteUrlRoot   = VersionUtil.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch);
        var assetVersionUrl = StringUtil.Contact(remoteUrlRoot, "/", "AssetsVersion.txt");

        HttpRequest.Instance.RequestHttpGet(assetVersionUrl, OnGetAssetVersionFile);
    }
Пример #2
0
    public void RequestVersionCheck()
    {
        var tables = new Dictionary <string, string>();

        tables["channel"]     = VersionConfig.Get().appId;
        tables["versioncode"] = VersionConfig.Get().version;
        if (VersionConfig.Get().branch != 0)
        {
            tables["branch"] = VersionConfig.Get().branch.ToString();
        }

        var url = StringUtil.Contact(VERSION_URL, HttpRequest.HashTableToString(tables));

        HttpRequest.Instance.RequestHttpGet(url, this.OnVersionCheckResult);
    }
Пример #3
0
    IEnumerator Co_Launch()
    {
        if (Application.platform == RuntimePlatform.Android ||
            Application.platform == RuntimePlatform.IPhonePlayer)
        {
            if (AssetsCopyTask.copiedVersion != VersionConfig.Get().version)
            {
                var assetCopy = AssetsCopyTask.BeginCopy(VersionConfig.Get().version);
                while (!assetCopy.done)
                {
                    yield return(null);
                }
            }
        }

        ConfigInitiator.Init();

        yield return(new WaitForSeconds(1f));

        SceneLoad.Instance.LoadLogin();
    }