About asset bundle¶
“CAssetBundleMgr” first loads “version.unit3d”.This section describes how this “version.unity3d” works.
When “version.unity3d” is updated¶
[Tools]->[KsSoft]->[Export Binary Data]
[Tools]->[KsSoft]->[Export Window Resource]
Automatically updates when you create or update any asset bundle.
Within these tools, the following functions are called.
ExportVersion.export(BuildTarget eTarget);
“version.unity3d” contains the following information before export.
Asset bundles that existed
MD5 of each asset bundle
Version number of each asset bundle
Information on which asset bundles are resident after loading
By calling this function, you are rebuilding “version.unity3d” if any changes were made compared to MD5 in the asset bundle in the folder corresponding to the build target.
At this time, the version number generated from the current time is given to the updated file.
This allows you to simply load “version.unity3d” to:
Know what’s in the asset bundle ahead of time.
“LoadFromCacheOrDownload” argument, version, can only be newly allocated to files that have changed, so only updates can be downloaded.
Note
If you want to create your own asset bundle, remember to export “version.unity3d” at the end of the script.
Asset Bundle Residency¶
It is possible to set the downloaded asset to reside during the “version.unity3d” update.
First, create a file named “version.def” in the same location as “Assets” folder.
#Texture for Window Resource
100_000_00001 = REMAIN:1;
#SoundEffect for 2D
052_000_00000 = REMAIN:1;
#SoundEffect for 3D
053_000_00000 = REMAIN:1;
The asset bundle you specify will reside after loading.
version.txt¶
“version.txt” is a “version.unity3d” that was visualized for debugging purposes only.
Unnecessary file at export/runtime.
Collisions, such as with version control tools¶
Please follow the steps below.
When asset bundles themselves collide¶
Please try to solve it.
When “version.unity3d” collides¶
Remove “version.unit3d” once after resolving all asset bundle conflicts.It then download the uploaded “version.unit3d”.Finally, re-export “version.unit3d” in the local environment in the following way:.
[Tools]->[KsSoft]->[Re-Export Version]