parent
f80a3229cc
commit
2204f4d129
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue