mirror of https://github.com/tuyoogame/YooAsset
parent
f80a3229cc
commit
2204f4d129
|
@ -28,6 +28,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 创建新补丁清单
|
// 创建新补丁清单
|
||||||
PatchManifest patchManifest = new PatchManifest();
|
PatchManifest patchManifest = new PatchManifest();
|
||||||
|
patchManifest.FileVersion = YooAssetSettings.PatchManifestFileVersion;
|
||||||
patchManifest.ResourceVersion = buildParameters.Parameters.BuildVersion;
|
patchManifest.ResourceVersion = buildParameters.Parameters.BuildVersion;
|
||||||
patchManifest.EnableAddressable = buildParameters.Parameters.EnableAddressable;
|
patchManifest.EnableAddressable = buildParameters.Parameters.EnableAddressable;
|
||||||
patchManifest.OutputNameStyle = (int)buildParameters.Parameters.OutputNameStyle;
|
patchManifest.OutputNameStyle = (int)buildParameters.Parameters.OutputNameStyle;
|
||||||
|
|
|
@ -12,6 +12,11 @@ namespace YooAsset
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal class PatchManifest
|
internal class PatchManifest
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 文件版本
|
||||||
|
/// </summary>
|
||||||
|
public string FileVersion;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资源版本号
|
/// 资源版本号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -229,6 +234,10 @@ namespace YooAsset
|
||||||
{
|
{
|
||||||
PatchManifest patchManifest = JsonUtility.FromJson<PatchManifest>(jsonData);
|
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
|
// BundleList
|
||||||
foreach (var patchBundle in patchManifest.BundleList)
|
foreach (var patchBundle in patchManifest.BundleList)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,11 +16,16 @@ namespace YooAsset
|
||||||
public string RawFileVariant = "rawfile";
|
public string RawFileVariant = "rawfile";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 构建输出的补丁清单文件名称
|
/// 补丁清单文件名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PatchManifestFileName = "PatchManifest";
|
public string PatchManifestFileName = "PatchManifest";
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 补丁清单文件版本
|
||||||
|
/// </summary>
|
||||||
|
public const string PatchManifestFileVersion = "1.2.2";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 构建输出文件夹名称
|
/// 构建输出文件夹名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue