UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

optimization

[Build] Fix Extreme Loading Latency in Exported Asset Modules

Solution

optimizationperformanceasset managementresource management

Unity 2021.x - Unity 6.3.x

Published 16 days ago

Issue

 Assets such as high-resolution character models experience significantly increased loading times when utilized within an exported module. A character that loads in seconds within a Standalone build may take several minutes to initialize when imported as a separate module, leading to severe performance degradation in your project.

Quick-Fix

Loading performance for exported modules is often throttled by the Compression method chosen during the build process, specifically when LZ4 or LZMA algorithms are used in a modular context.

Expand Analysis

The discrepancy in loading times between standard application packages and exported modules is typically resolved by modifying the Compression settings within the Unity editor. While specific Compression algorithms like LZ4 are designed for chunk-based access, they can occasionally introduce massive overhead in module-based architectures.

To optimize loading speeds, follow these steps:

  1. Open the Build Settings window from the File menu.
  2. Locate the Compression Method dropdown menu.
  3. Change the selected value from LZ4 or LZMA to Default (or None if your project requirements allow for larger file sizes).
  4. Re-export your module and re-import it into the target project.

By reverting to the Default Compression method, the de-serialization process for assets within the module is streamlined, restoring the expected 1-2 second loading window.

Additional Tips

  • Check the BuildReport to identify if individual asset sizes are unexpectedly large after changing the Compression method.
  • If using Addressables within your module, ensure the Bundle Compression setting matches the project’s global Compression strategy.
  • Verify that the target platform supports the selected Compression type to avoid runtime fallback overhead.

Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.