mirror of https://github.com/tuyoogame/YooAsset
update extension sample
parent
009e8ece79
commit
76b31bd3cf
|
@ -51,10 +51,6 @@ namespace YooAsset.Editor
|
||||||
string manifestFileName = Path.GetFileNameWithoutExtension(manifestFilePath);
|
string manifestFileName = Path.GetFileNameWithoutExtension(manifestFilePath);
|
||||||
string outputDirectory = Path.GetDirectoryName(manifestFilePath);
|
string outputDirectory = Path.GetDirectoryName(manifestFilePath);
|
||||||
|
|
||||||
// 加载补丁清单
|
|
||||||
byte[] bytesData = FileUtility.ReadAllBytes(manifestFilePath);
|
|
||||||
PackageManifest manifest = ManifestTools.DeserializeFromBinary(bytesData);
|
|
||||||
|
|
||||||
// 拷贝核心文件
|
// 拷贝核心文件
|
||||||
{
|
{
|
||||||
string sourcePath = $"{outputDirectory}/{manifestFileName}.bytes";
|
string sourcePath = $"{outputDirectory}/{manifestFileName}.bytes";
|
||||||
|
@ -67,12 +63,16 @@ namespace YooAsset.Editor
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
string fileName = YooAssetSettingsData.GetPackageVersionFileName(manifest.PackageName);
|
string fileName = YooAssetSettingsData.GetPackageVersionFileName(_packageName);
|
||||||
string sourcePath = $"{outputDirectory}/{fileName}";
|
string sourcePath = $"{outputDirectory}/{fileName}";
|
||||||
string destPath = $"{AssetBundleBuilderHelper.GetStreamingAssetsRoot()}/{_packageName}/{fileName}";
|
string destPath = $"{AssetBundleBuilderHelper.GetStreamingAssetsRoot()}/{_packageName}/{fileName}";
|
||||||
EditorTools.CopyFile(sourcePath, destPath, true);
|
EditorTools.CopyFile(sourcePath, destPath, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加载补丁清单
|
||||||
|
byte[] bytesData = FileUtility.ReadAllBytes(manifestFilePath);
|
||||||
|
PackageManifest manifest = ManifestTools.DeserializeFromBinary(bytesData);
|
||||||
|
|
||||||
// 拷贝文件列表
|
// 拷贝文件列表
|
||||||
int fileCount = 0;
|
int fileCount = 0;
|
||||||
foreach (var packageBundle in manifest.BundleList)
|
foreach (var packageBundle in manifest.BundleList)
|
||||||
|
|
Loading…
Reference in New Issue