tuyoogame / YooAsset

unity3d resources management system
https://www.yooasset.com/
Apache License 2.0
2.41k stars 469 forks source link

想问一下差量包的打法(类似 Addressables 的Update a Previous Build) #284

Open Odaimoko opened 5 months ago

Odaimoko commented 5 months ago

现在想仿照 Addressables 那样,直接执行一个 Update a Previous Build,生成一个差量的更新包,里面只有需要更新的项目。 不过翻了下文档和代码,米有找到对等的功能,烦请指教一下咱们YooAsset需要怎么操作,谢谢啦!

这里是 Addressables 那边的文档地址 https://docs.unity3d.com/Packages/com.unity.addressables@1.21/manual/builds-update-build.html

gmhevinci commented 5 months ago

你是不是再找这个功能?可以参考一下链接脚本:https://github.com/tuyoogame/YooAsset/tree/dev/Assets/YooAsset/Samples~/Extension%20Sample/Scripts/Editor/PackageComparator

Odaimoko commented 5 months ago

你是不是再找这个功能?可以参考一下链接脚本:https://github.com/tuyoogame/YooAsset/tree/dev/Assets/YooAsset/Samples~/Extension%20Sample/Scripts/Editor/PackageComparator

有点不一样。这个链接里面的参考是,在打包完成后选择两个清单,比对他们的内容对吧,清单已经是 build 完成的结果了。

Addressables 有两个工具 (1)Check for Content Update Restrictions tool: 这个工具可以让老包里更改的东西导出一个新包,生成一个新的 Bundle 打包配置,这个 Bundle 里面只有“修改或者新增”的内容,然后发布的时候我们只需要发布这个新的 Bundle(以及新的清单)。

(2) Update a Previous Build作用是,选择上一次 build 的清单,生成新的清单和更新的 Bundle。

所以想问问这边有没有可以自动化产出一个“差量 Bundle”的功能。

gmhevinci commented 5 months ago

你是不是再找这个功能?可以参考一下链接脚本:https://github.com/tuyoogame/YooAsset/tree/dev/Assets/YooAsset/Samples~/Extension%20Sample/Scripts/Editor/PackageComparator

有点不一样。这个链接里面的参考是,在打包完成后选择两个清单,比对他们的内容对吧,清单已经是 build 完成的结果了。

Addressables 有两个工具 (1)Check for Content Update Restrictions tool: 这个工具可以让老包里更改的东西导出一个新包,生成一个新的 Bundle 打包配置,这个 Bundle 里面只有“修改或者新增”的内容,然后发布的时候我们只需要发布这个新的 Bundle(以及新的清单)。

(2) Update a Previous Build作用是,选择上一次 build 的清单,生成新的清单和更新的 Bundle。

所以想问问这边有没有可以自动化产出一个“差量 Bundle”的功能。

我不确定(1)方式里,如果旧的Bunlde和新Bundle同时加载到内存里,引擎会怎么区分。