Addressable 热更新
2021-03-05 10:16:52 15 举报
AI智能生成
address
作者其他创作
大纲/内容
Addressable
文件作用
Schemas
Addressables_Content_State.bin
Thie file contains hash and dependency information for every Cannot Change Post Release Asset group
Catalog
Group
Content Update Restriction
Cannot Change Post Release
AssetBundle copy to streamingasset folder
Content marked as Cannot shiped with then app (or download sonn after install)
Can ChangePost Release
DynamicContent that you except to update
Content Packing & Loading
BuildPath
LocalPaht
Tools
Check for content update restrictions
This will take any modified Asset out of the Cannot Change Post Release groups and move them to a new group
仅对Cannot Change Post Release有效
AddressableAssetSettings
Build Remote Catalog
API
Addressables.CheckForCatalogUpdates
获取更新的资源列表
Addressables.UpdateCatalogs
跟新本地的catalog与服务器一致
Disable Catelog Update On Startup
勾选
那么将不会自动更新Catalog文件,意味着不会自动更新资源。
需要自己判断资源更新
不勾选
那么每次AA系统初使化的时候会自动去更新Catalog
Checking for content updates at runtime
Update Asset (Download Asset)
更新的assetbundle会存储到默认缓存路径(路径可配置)
PC
AppDate -> LocalLow -> Unity (默认缓存路径)
APPData -> LocalLow -> DefaultCompany (persistentDataPaht)
更新基本流程
游戏启动,调用GetDownloadSizeAsync检查获取需要更新资源的大小
调用DownloadDependenciesAsync进行下载更新
实际调用
Download—>LoadAssetAsync—>Load AB—>Load Asset—>release Asset
进入游戏,正常加载和实例化
设计定时或者特定的点进行CheckForCatalogUpdates操作
有更新情况下,提示玩家,并切换到更新界面
释放之前使用的资产
调用UpdateCatalogs更新Catalogs
重复走1、2、3的流程
收藏
0 条评论
回复 删除
下一页