unity hot update framework

baxi 14ee04bc90 1 2 weeks ago
Documentation~ 1d9251d443 增加使用本地资源测试的模式 2 weeks ago
Editor 14ee04bc90 1 2 weeks ago
Runtime 1d9251d443 增加使用本地资源测试的模式 2 weeks ago
Samples~ cadee32c0e 1 2 weeks ago
StreamingAssets~ cadee32c0e 1 2 weeks ago
Tests~ cadee32c0e 1 2 weeks ago
ThirdParty cadee32c0e 1 2 weeks ago
Tools~ cadee32c0e 1 2 weeks ago
.gitignore cadee32c0e 1 2 weeks ago
CHANGELOG.md 1d9251d443 增加使用本地资源测试的模式 2 weeks ago
CHANGELOG.md.meta cadee32c0e 1 2 weeks ago
Editor.meta cadee32c0e 1 2 weeks ago
README.md a53ed6f7ba 添加HybridCLR 自动安装 2 weeks ago
README.md.meta cadee32c0e 1 2 weeks ago
Runtime.meta cadee32c0e 1 2 weeks ago
Third Party Notices.md cadee32c0e 1 2 weeks ago
Third Party Notices.md.meta cadee32c0e 1 2 weeks ago
ThirdParty.meta cadee32c0e 1 2 weeks ago
package.json a53ed6f7ba 添加HybridCLR 自动安装 2 weeks ago
package.json.meta cadee32c0e 1 2 weeks ago

README.md

app_runtimes_hot

Unity AppRuntimes package with a HybridCLR hot patch module.

After importing AppRuntimes through Package Manager, the Editor automatically installs the missing com.code-philosophy.hybridclr package from the official Git mirror at v9.0.3. Existing HybridCLR installations are preserved. AppSettings shows installation status and a retry button if installation fails. See package installation for details.

AppSettings includes 上传资源 for recursive S3 uploads. See the S3 upload guide for local credentials, destination paths, and manifest publication order.

The Hot Patch guide covers the Sources wrapper, original and update resource builds, DownloadUrl, and incremental resource updates.

Application code stays in Runtime/Sources, where UNITY_EDITOR excludes it from Player compilation. Select the hot patch assembly in AppSettings and click Save to synchronize HybridCLR settings. Original builds check Install and Generate/All, then delete the target HotPatch directory. Update builds copy changed Sources into that directory and remove only the outer wrapper. The loader uses the saved assembly name to load the DLL, then scans for and invokes methods marked with HotPatchInitializer. The original DLL does not require an initializer. NativeApi.cs in AppRuntimes.Base contains only AppInfo, TimeZone, and Dialog; other SDKs retain their own AOT native interfaces.

The 资源构建 menu contains only 一键打包资源. It builds both original and update resources into Build/HotUpdate/AllRes_<timestamp>, keeps only original resources in StreamingAssets, and removes the generated HotPatch sources before publishing. Launch extracts original resources into a temporary cache, compares the remote manifest, and downloads changed resources.

In the Editor, Launch waits until the game scene is loaded and active before invoking the initializer from AppRuntimes.Sources.Editor. This call and the Sources assembly are excluded from Player builds. Players continue to initialize the downloaded hot-update DLL through its tagged methods.