| | |
| | | if (check && VersionUtility.Instance.NeedDownAsset())
|
| | | {
|
| | | checkAssetVersionTimer += Time.time + 10f;
|
| | | var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), "/", Language.Id, "/AssetsVersion.txt");
|
| | | var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/AssetsVersion.txt");
|
| | | HttpRequest.Instance.RequestHttpGet(assetVersionUrl, HttpRequest.defaultHttpContentType, 3, OnGetAssetVersionFile);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | checkAssetCompleted = false;
|
| | | Debug.LogFormat("开始获取资源版本文件:时间 {0}", DateTime.Now);
|
| | | var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), "/", Language.Id, "/AssetsVersion.txt");
|
| | | var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/AssetsVersion.txt");
|
| | | assetVerUrl = assetVersionUrl;
|
| | | Debug.Log("http地址:assetVersionUrl " + assetVersionUrl);
|
| | | HttpRequest.Instance.RequestHttpGet(assetVersionUrl, HttpRequest.defaultHttpContentType, 3, OnGetAssetVersionFile);
|
| | |
| | | for (int i = 0; i < tasks.Count; i++)
|
| | | {
|
| | | var assetVersion = tasks[i];
|
| | | var remoteURL = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), "/", Language.Id, "/", assetVersion.relativePath);
|
| | | var remoteURL = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/", assetVersion.relativePath);
|
| | | var localURL = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, assetVersion.relativePath);
|
| | | DownloadMgr.Instance.AddTask(new DownloadTask(remoteURL, localURL));
|
| | | }
|
| | |
| | | mapTasks[mapId].Add(assetVersion);
|
| | | }
|
| | | //添加下载任务
|
| | | var remoteURL = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), "/", Language.Id, "/", assetVersion.relativePath);
|
| | | var remoteURL = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/", assetVersion.relativePath);
|
| | | var localURL = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, assetVersion.relativePath);
|
| | | DownloadMgr.Instance.AddTask(new DownloadTask(remoteURL, localURL, assetVersion));
|
| | | }
|
| | |
| | | var config = InitialFunctionConfig.Get("Language").Numerical2;
|
| | | if (string.IsNullOrEmpty(config))
|
| | | return;
|
| | | var id = LocalSave.GetString("LANGUAGE_ID");
|
| | | var id = LocalSave.GetString("LANGUAGE_ID1");
|
| | | if (!string.IsNullOrEmpty(id))
|
| | | return;
|
| | | switch (Application.systemLanguage)
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | var id = LocalSave.GetString("LANGUAGE_ID");
|
| | | var id = LocalSave.GetString("LANGUAGE_ID1");
|
| | | if (string.IsNullOrEmpty(id))
|
| | | id = defaultId;
|
| | | return id;
|
| | | }
|
| | | set
|
| | | {
|
| | | LocalSave.SetString("LANGUAGE_ID", value);
|
| | | LocalSave.SetString("LANGUAGE_ID1", value);
|
| | | }
|
| | | }
|
| | |
|
| | | //默认路径不附加地址,Id不为空时附加Id
|
| | | public static string fixPath
|
| | | {
|
| | | get
|
| | | {
|
| | | if (string.IsNullOrEmpty(Id))
|
| | | return "";
|
| | | return string.Format("/{0}", Id);
|
| | | }
|
| | | }
|
| | |
|