mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
ResourceModule UpdateMainfest Info and Save operation.SavePackageVersion();
ResourceModule UpdateMainfest Info and Save operation.SavePackageVersion();
This commit is contained in:
@@ -32,6 +32,9 @@ namespace GameMain
|
||||
|
||||
if(operation.Status == EOperationStatus.Succeed)
|
||||
{
|
||||
//更新成功
|
||||
//注意:保存资源版本号作为下次默认启动的版本!
|
||||
operation.SavePackageVersion();
|
||||
ChangeState<ProcedureCreateDownloader>(procedureOwner);
|
||||
}
|
||||
else
|
||||
|
@@ -58,7 +58,7 @@ namespace GameMain
|
||||
{
|
||||
//线上最新版本operation.PackageVersion
|
||||
GameModule.Resource.PackageVersion = operation.PackageVersion;
|
||||
|
||||
Log.Debug($"Updated package Version : from {GameModule.Resource.GetPackageVersion()} to {operation.PackageVersion}");
|
||||
ChangeState<ProcedureUpdateManifest>(_procedureOwner);
|
||||
}
|
||||
else
|
||||
|
@@ -202,6 +202,21 @@ namespace TEngine
|
||||
return m_ResourceManager.InitPackage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前资源包版本。
|
||||
/// </summary>
|
||||
/// <returns>资源包版本。</returns>
|
||||
public string GetPackageVersion()
|
||||
{
|
||||
var package = YooAssets.GetPackage(packageName);
|
||||
if (package == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return package.GetPackageVersion();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 异步更新最新包的版本。
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user