| | |
| | | { |
| | | checkAssetCompleted = false; |
| | | Debug.LogFormat("开始获取资源版本文件:时间 {0}", DateTime.Now); |
| | | var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/AssetsVersion.txt"); |
| | | var assetVersionUrl = StringUtility.Concat(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/AssetsVersion.txt"); |
| | | assetVerUrl = assetVersionUrl; |
| | | Debug.Log("http地址:assetVersionUrl " + assetVersionUrl); |
| | | HttpRequest.Instance.UnityWebRequestGet(assetVersionUrl, 5, OnGetAssetVersionFile); |
| | |
| | | // return false; |
| | | // } |
| | | |
| | | // if (!IsAssetValid(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower()))) |
| | | // if (!IsAssetValid(StringUtility.Concat("maps/", mapResConfig.MapResources.ToLower()))) |
| | | // { |
| | | // return false; |
| | | // } |
| | |
| | | // var npcConfig = NPCConfig.Get(item); |
| | | // if (npcConfig != null) |
| | | // { |
| | | // var assetbundleName = StringUtility.Contact("prefab_race_", npcConfig.MODE.ToLower()); |
| | | // if (!IsAssetValid(StringUtility.Contact("gmodels/", assetbundleName))) |
| | | // var assetbundleName = StringUtility.Concat("prefab_race_", npcConfig.MODE.ToLower()); |
| | | // if (!IsAssetValid(StringUtility.Concat("gmodels/", assetbundleName))) |
| | | // { |
| | | // return false; |
| | | // } |
| | |
| | | // { |
| | | // headString = name.Substring(0, index); |
| | | // name = name.Substring(index + 1); |
| | | // return StringUtility.Contact(headString, "/", new string(name.Reverse().ToArray()), "_aop"); |
| | | // return StringUtility.Concat(headString, "/", new string(name.Reverse().ToArray()), "_aop"); |
| | | // } |
| | | // else |
| | | // { |
| | | // headString = name.Substring(0, index); |
| | | // var ext = name.Substring(dotLastIndex); |
| | | // name = name.Substring(index + 1, dotLastIndex - index - 1); |
| | | // return StringUtility.Contact(headString, "/", new string(name.Reverse().ToArray()), "_aop", ext); |
| | | // return StringUtility.Concat(headString, "/", new string(name.Reverse().ToArray()), "_aop", ext); |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | // int dotLastIndex = name.LastIndexOf("."); |
| | | // if (dotLastIndex == -1) |
| | | // return StringUtility.Contact(new string(name.Reverse().ToArray()), "_aop"); |
| | | // return StringUtility.Concat(new string(name.Reverse().ToArray()), "_aop"); |
| | | // else |
| | | // { |
| | | // var ext = name.Substring(dotLastIndex); |
| | | // name = name.Substring(0, dotLastIndex); |
| | | // return StringUtility.Contact(new string(name.Reverse().ToArray()), "_aop", ext); |
| | | // return StringUtility.Concat(new string(name.Reverse().ToArray()), "_aop", ext); |
| | | // } |
| | | //} |
| | | |
| | |
| | | // { |
| | | // headString = name.Substring(0, index); |
| | | // name = name.Substring(index + 1); |
| | | // return StringUtility.Contact(headString, "/", new string(name.Replace("_aop", "").Reverse().ToArray())); |
| | | // return StringUtility.Concat(headString, "/", new string(name.Replace("_aop", "").Reverse().ToArray())); |
| | | // } |
| | | // else |
| | | // { |
| | | // headString = name.Substring(0, index); |
| | | // var ext = name.Substring(dotLastIndex); |
| | | // name = name.Substring(index + 1, dotLastIndex - index - 1); |
| | | // return StringUtility.Contact(headString, "/", new string(name.Replace("_aop", "").Reverse().ToArray()), ext); |
| | | // return StringUtility.Concat(headString, "/", new string(name.Replace("_aop", "").Reverse().ToArray()), ext); |
| | | // } |
| | | //} |
| | | //else |
| | |
| | | { |
| | | if (reverse) |
| | | _assetKey = EncodeFileName(_assetKey); |
| | | var path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, _assetKey); |
| | | var path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, _assetKey); |
| | | if (!File.Exists(path)) |
| | | { |
| | | path = StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, _assetKey); |
| | | path = StringUtility.Concat(ResourcesPath.Instance.StreamingAssetPath, _assetKey); |
| | | } |
| | | |
| | | return path; |
| | |
| | | { |
| | | if (reverse) |
| | | _assetKey = EncodeFileName(_assetKey); |
| | | var path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, _assetKey); |
| | | var path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, _assetKey); |
| | | if (!File.Exists(path)) |
| | | { |
| | | path = StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, _assetKey); |
| | | path = StringUtility.Concat(ResourcesPath.Instance.StreamingAssetPath, _assetKey); |
| | | } |
| | | |
| | | return path; |