Ver código fonte

fix进游戏场景时会一直向CDN请求skillcfg的问题。

大爷 2 anos atrás
pai
commit
6e7abe580b

+ 1 - 1
Unity/Assets/AssetBundleCollectorSetting.asset

@@ -49,7 +49,7 @@ MonoBehaviour:
       AddressRuleName: AddressByGroupAndFileName
       PackRuleName: PackDirectory
       FilterRuleName: CollectAll
-      AssetTags: SkillConfig
+      AssetTags:
   - GroupName: Unit
     GroupDesc: Unit
     AssetTags: 

+ 4 - 1
Unity/Assets/ThirdParty/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs

@@ -18,6 +18,9 @@ namespace YooAsset
 			Done,
 		}
 
+		//从服务器下载重试次数
+		private const int RetryCnt = 2;
+
 		private ESteps _steps = ESteps.None;
 		private string _fileLoadPath;
 		private bool _isWaitForAsyncComplete = false;
@@ -73,7 +76,7 @@ namespace YooAsset
 			// 1. 从服务器下载
 			if (_steps == ESteps.Download)
 			{
-				int failedTryAgain = int.MaxValue;
+				int failedTryAgain = RetryCnt;
 				_downloader = DownloadSystem.BeginDownload(MainBundleInfo, failedTryAgain);
 				_steps = ESteps.CheckDownload;
 			}