unity hot update framework

baxi 1e77196cfd 1 3 weeks ago
Documentation~ cadee32c0e 1 3 weeks ago
Editor 1e77196cfd 1 3 weeks ago
Runtime cadee32c0e 1 3 weeks ago
Samples~ cadee32c0e 1 3 weeks ago
StreamingAssets~ cadee32c0e 1 3 weeks ago
Tests~ cadee32c0e 1 3 weeks ago
ThirdParty cadee32c0e 1 3 weeks ago
Tools~ cadee32c0e 1 3 weeks ago
.gitignore cadee32c0e 1 3 weeks ago
CHANGELOG.md cadee32c0e 1 3 weeks ago
CHANGELOG.md.meta cadee32c0e 1 3 weeks ago
Editor.meta cadee32c0e 1 3 weeks ago
README.md cadee32c0e 1 3 weeks ago
README.md.meta cadee32c0e 1 3 weeks ago
Runtime.meta cadee32c0e 1 3 weeks ago
Third Party Notices.md cadee32c0e 1 3 weeks ago
Third Party Notices.md.meta cadee32c0e 1 3 weeks ago
ThirdParty.meta cadee32c0e 1 3 weeks ago
package.json cadee32c0e 1 3 weeks ago
package.json.meta cadee32c0e 1 3 weeks ago

README.md

app_runtimes_hot

Unity AppRuntimes package with a HybridCLR hot patch module.

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.