update editor code
parent
f771a98f25
commit
a95697088b
|
@ -23,7 +23,7 @@ namespace YooAsset.Editor
|
||||||
var buildResult = builder.Run(buildParameters);
|
var buildResult = builder.Run(buildParameters);
|
||||||
if (buildResult.Success)
|
if (buildResult.Success)
|
||||||
{
|
{
|
||||||
string manifestFileName = YooAssetSettingsData.GetPatchManifestBinaryFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
string manifestFileName = YooAssetSettingsData.GetManifestBinaryFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
string manifestFilePath = $"{buildResult.OutputPackageDirectory}/{manifestFileName}";
|
string manifestFilePath = $"{buildResult.OutputPackageDirectory}/{manifestFileName}";
|
||||||
return manifestFilePath;
|
return manifestFilePath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 拷贝补丁清单文件
|
// 拷贝补丁清单文件
|
||||||
{
|
{
|
||||||
string fileName = YooAssetSettingsData.GetPatchManifestBinaryFileName(buildPackageName, buildPackageVersion);
|
string fileName = YooAssetSettingsData.GetManifestBinaryFileName(buildPackageName, buildPackageVersion);
|
||||||
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
|
@ -53,7 +53,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 拷贝补丁清单哈希文件
|
// 拷贝补丁清单哈希文件
|
||||||
{
|
{
|
||||||
string fileName = YooAssetSettingsData.GetPatchManifestHashFileName(buildPackageName, buildPackageVersion);
|
string fileName = YooAssetSettingsData.GetPackageHashFileName(buildPackageName, buildPackageVersion);
|
||||||
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
|
@ -61,7 +61,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 拷贝补丁清单版本文件
|
// 拷贝补丁清单版本文件
|
||||||
{
|
{
|
||||||
string fileName = YooAssetSettingsData.GetPatchManifestVersionFileName(buildPackageName);
|
string fileName = YooAssetSettingsData.GetPackageVersionFileName(buildPackageName);
|
||||||
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
string sourcePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
string destPath = $"{streamingAssetsDirectory}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 创建补丁清单文本文件
|
// 创建补丁清单文本文件
|
||||||
{
|
{
|
||||||
string fileName = YooAssetSettingsData.GetPatchManifestJsonFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
string fileName = YooAssetSettingsData.GetManifestJsonFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
string filePath = $"{packageOutputDirectory}/{fileName}";
|
string filePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
PatchManifestTools.SerializeToJson(filePath, patchManifest);
|
PatchManifestTools.SerializeToJson(filePath, patchManifest);
|
||||||
BuildRunner.Log($"创建补丁清单文件:{filePath}");
|
BuildRunner.Log($"创建补丁清单文件:{filePath}");
|
||||||
|
@ -63,7 +63,7 @@ namespace YooAsset.Editor
|
||||||
// 创建补丁清单二进制文件
|
// 创建补丁清单二进制文件
|
||||||
string packageHash;
|
string packageHash;
|
||||||
{
|
{
|
||||||
string fileName = YooAssetSettingsData.GetPatchManifestBinaryFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
string fileName = YooAssetSettingsData.GetManifestBinaryFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
string filePath = $"{packageOutputDirectory}/{fileName}";
|
string filePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
PatchManifestTools.SerializeToBinary(filePath, patchManifest);
|
PatchManifestTools.SerializeToBinary(filePath, patchManifest);
|
||||||
packageHash = HashUtility.FileMD5(filePath);
|
packageHash = HashUtility.FileMD5(filePath);
|
||||||
|
@ -77,7 +77,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 创建补丁清单哈希文件
|
// 创建补丁清单哈希文件
|
||||||
{
|
{
|
||||||
string fileName = YooAssetSettingsData.GetPatchManifestHashFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
string fileName = YooAssetSettingsData.GetPackageHashFileName(buildParameters.PackageName, buildParameters.PackageVersion);
|
||||||
string filePath = $"{packageOutputDirectory}/{fileName}";
|
string filePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
FileUtility.CreateFile(filePath, packageHash);
|
FileUtility.CreateFile(filePath, packageHash);
|
||||||
BuildRunner.Log($"创建补丁清单哈希文件:{filePath}");
|
BuildRunner.Log($"创建补丁清单哈希文件:{filePath}");
|
||||||
|
@ -85,7 +85,7 @@ namespace YooAsset.Editor
|
||||||
|
|
||||||
// 创建补丁清单版本文件
|
// 创建补丁清单版本文件
|
||||||
{
|
{
|
||||||
string fileName = YooAssetSettingsData.GetPatchManifestVersionFileName(buildParameters.PackageName);
|
string fileName = YooAssetSettingsData.GetPackageVersionFileName(buildParameters.PackageName);
|
||||||
string filePath = $"{packageOutputDirectory}/{fileName}";
|
string filePath = $"{packageOutputDirectory}/{fileName}";
|
||||||
FileUtility.CreateFile(filePath, buildParameters.PackageVersion);
|
FileUtility.CreateFile(filePath, buildParameters.PackageVersion);
|
||||||
BuildRunner.Log($"创建补丁清单版本文件:{filePath}");
|
BuildRunner.Log($"创建补丁清单版本文件:{filePath}");
|
||||||
|
|
Loading…
Reference in New Issue