Version: Unity 6.1 (6000.1)
Language : English
Handling dependencies between AssetBundles
Downloading AssetBundles

Optimizing AssetBundles

Loading AssetBundles can consume memory depending on compressionA method of storing data that reduces the amount of storage space it requires. See Texture Compression, Animation Compression, Audio Compression, Build Compression.
See in Glossary
formats and access patterns.

Temporary in-memory AssetBundles

Unity manages memory efficiently, but temporary in-memory AssetBundles are created in the following scenarios:

  • LZMA-compressed bundles loaded via AssetBundle.LoadFromFile, LoadFromMemory, or LoadFromStream APIs.
  • AssetBundles downloaded without a version or hash.

Temporary files exist until reads complete and AssetBundle.Unload is called.

Caching considerations

  • LZ4 Default: Temporary in-memory bundles use LZ4 when Caching.compressionEnabled is true.
  • Uncompressed: When false, temporary bundles are uncompressed, potentially increasing RAM usage.

CRC checks and performance

CRC checks for chunk-based (LZ4) files do not require full-file decompression but may affect load times.

CRC checks for LZMA files incur no additional cost, as full decompression is inherent. For more information, refer to Downloading AssetBundles.

Memory Profiler and AssetBundles

Use Memory Profiler to monitor memory usage and optimize AssetBundle loading workflows.

Additional resources

Handling dependencies between AssetBundles
Downloading AssetBundles