【m】优化加载架构
This commit is contained in:
@@ -20,38 +20,17 @@ namespace Stary.Evo
|
||||
|
||||
//更新失败
|
||||
|
||||
Debug.Log($"UnityEvo:切换为加载本地缓存资源...");
|
||||
string packageVersion = "";
|
||||
// if (package.PackageName.Equals("Main"))
|
||||
// {
|
||||
// var operation = package.RequestPackageVersionAsync();
|
||||
// await operation;
|
||||
// if (operation.Status == EOperationStatus.Succeed)
|
||||
// {
|
||||
// //更新成功
|
||||
// packageVersion = operation.PackageVersion;
|
||||
// Debug.Log($"Unity:【Main】Request package Version : {packageVersion}");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //更新失败
|
||||
// Debug.LogError("Unity:【Main】" + operation.Error);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
Debug.Log($"UnityEvo:开始加载本地缓存资源...");
|
||||
|
||||
// 获取上次成功记录的版本
|
||||
string packageVersion = PlayerPrefs.GetString($"{AppConfig.PackageDomainName}_GAME_VERSION", string.Empty);
|
||||
if (string.IsNullOrEmpty(packageVersion))
|
||||
{
|
||||
// 获取上次成功记录的版本
|
||||
packageVersion = PlayerPrefs.GetString($"{AppConfig.PackageDomainName}_GAME_VERSION", string.Empty);
|
||||
if (string.IsNullOrEmpty(packageVersion))
|
||||
{
|
||||
Debug.Log($"UnityEvo:没有找到本地版本记录,需要更新资源!");
|
||||
return;
|
||||
}
|
||||
Debug.Log($"UnityEvo:没有找到本地版本记录,需要更新资源!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Debug.Log($"UnityEvo:获取资源版本 Version : 【{packageVersion}】");
|
||||
Debug.Log($"UnityEvo:开始加载本地资源...");
|
||||
// Assert.AreEqual(EOperationStatus.Succeed, requetVersionOp.Status);
|
||||
|
||||
|
||||
@@ -74,7 +53,7 @@ namespace Stary.Evo
|
||||
|
||||
|
||||
//4.下载补丁包
|
||||
await Download();
|
||||
//await Download();
|
||||
|
||||
|
||||
//加载热更配置文件
|
||||
|
||||
Reference in New Issue
Block a user