mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-24 09:40:11 +00:00
Update PatchManifest
资源补丁清单增加文件版本信息
This commit is contained in:
@@ -28,6 +28,7 @@ namespace YooAsset.Editor
|
||||
|
||||
// 创建新补丁清单
|
||||
PatchManifest patchManifest = new PatchManifest();
|
||||
patchManifest.FileVersion = YooAssetSettings.PatchManifestFileVersion;
|
||||
patchManifest.ResourceVersion = buildParameters.Parameters.BuildVersion;
|
||||
patchManifest.EnableAddressable = buildParameters.Parameters.EnableAddressable;
|
||||
patchManifest.OutputNameStyle = (int)buildParameters.Parameters.OutputNameStyle;
|
||||
|
||||
@@ -12,6 +12,11 @@ namespace YooAsset
|
||||
[Serializable]
|
||||
internal class PatchManifest
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件版本
|
||||
/// </summary>
|
||||
public string FileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// 资源版本号
|
||||
/// </summary>
|
||||
@@ -229,6 +234,10 @@ namespace YooAsset
|
||||
{
|
||||
PatchManifest patchManifest = JsonUtility.FromJson<PatchManifest>(jsonData);
|
||||
|
||||
// 检测文件版本
|
||||
if (patchManifest.FileVersion != YooAssetSettings.PatchManifestFileVersion)
|
||||
throw new Exception($"The manifest file version are not compatible : {patchManifest.FileVersion} != {YooAssetSettings.PatchManifestFileVersion}");
|
||||
|
||||
// BundleList
|
||||
foreach (var patchBundle in patchManifest.BundleList)
|
||||
{
|
||||
|
||||
@@ -16,11 +16,16 @@ namespace YooAsset
|
||||
public string RawFileVariant = "rawfile";
|
||||
|
||||
/// <summary>
|
||||
/// 构建输出的补丁清单文件名称
|
||||
/// 补丁清单文件名称
|
||||
/// </summary>
|
||||
public string PatchManifestFileName = "PatchManifest";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 补丁清单文件版本
|
||||
/// </summary>
|
||||
public const string PatchManifestFileVersion = "1.2.2";
|
||||
|
||||
/// <summary>
|
||||
/// 构建输出文件夹名称
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user