Unity AssetBundle resource hot update plugin

CatAssetManager

Run Mode - Package Only

  • Uncheck IsEditorMode: Use AssetBundle to load in-game resources
  • Activate IsEditorMode Check: Use AssetDatabase.LoadAssetAtPath to load only Editor

Reminder: IsEditorMode is restricted by macros. If you are not in UNITY_EDITOR mode (when you were on a real device), IsEditorMode is forced to False to prevent users from forgetting to close it after packaging
insert image description here

Create a new AssetBundle

Select folder - add as resource bundle build directory - refresh resource bundle build information
insert image description here

Change the Group classification of AssetBundle

[Frameworks] - [CatAsset] - [Open resource package build window]

[Build Directory] - [Select the newly created directory] - [Select Resource Group]
insert image description here

Change the packaging method of AssetBundle to build the rule encryption method

insert image description here

Output AssetBundle

This is basically typed out insert image description here
for use: Select PackageOnly mode to close IsEditorMode
insert image description here

Run Mode - Updateable

Today we focus on how to use this

Check out our hotfix Bundle output directory

Every time we package, we will copy a copy of the latest current platform from the Assetbundle to the WebServer directory under the root directory, and we will upload it to the server later.
insert image description here

WebServer directory

insert image description here

upload to server

insert image description here

Select hot update mode - Updatable

insert image description here

Fill in the server path

insert image description here

related documents

Finally, thanks to @猫星人for the technical support and help
http://cathole.top/2022/08/30/catasset-guide/
https://github.com/CatImmortal

Guess you like

Origin blog.csdn.net/qq_39162566/article/details/130847248