Quick answer: Build with BuildAssetBundleOptions.ChunkBasedCompression (LZ4). Use LoadFromFileAsync at runtime.
Open inventory loads a bundle. 200ms freeze. LZMA decompression on main thread blocks rendering.
The Fix
// Build
BuildPipeline.BuildAssetBundles(
outputPath, builds,
BuildAssetBundleOptions.ChunkBasedCompression, // LZ4
BuildTarget.StandaloneWindows64);
// Runtime
var req = AssetBundle.LoadFromFileAsync(path);
yield return req;
var bundle = req.assetBundle;
var assetReq = bundle.LoadAssetAsync<GameObject>("item.prefab");
yield return assetReq;
Instantiate(assetReq.asset);
LZ4 decompresses in chunks, streaming. Async APIs hand work to a background thread. No main-thread freeze.
Verifying
Profiler: AssetBundle.LoadFromFile time on worker thread; main thread frame time stable. Visible hitch gone.
“LZ4 build. Async load. No freeze.”
Related Issues
For AssetBundle dedup, see dedup. For Addressables update, see content update.
LZ4. Async. Smooth.