Search Issue Tracker
By Design
Votes
0
Found in
2017.4.4f1
Issue ID
1051131
Regression
No
Inconsistent AssetBundle build times with different compression settings while using some images (possibly transparent)
Reproduction steps:
1. Open "AssetBundleBuildTime" project
2. "Window" -> "AssetBundle Browser"
3. Drag "Lightmap-0_comp_shadowmask_png_original" into the "AssetBundle Browser"
4. Select the "Build" tab
5. Select "Clear Folders", "Force Rebuild", set "Compression" to "No Compression"
6. "Build"
7. Repeat with "Compression" set to "LZMA" and "LZ4"
8. Repeat from step 3 with "Lightmap-0_comp_shadowmask_tif", "Planks5a_png" and "Planks5a_tif_original"
Expected Result: The compression times should be "LZMA" > "LZ4" > "No Compression"
Actual Result: The compression times are "LZ4" > "LZMA" > "No Compression" with the first 2 images (shadow mask)
Reproduced with: 2018.3.0a6, 2018.2.2f1, 2018.1.9f1, 2017.4.8f1, 2017.3.2f1
Note:
Possibly related to transparency in the images used in the bundle
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- NullReferenceException is thrown when creating the TextMeshPro component and entering the Play Mode without importing TMP Essentials
- [Linux] Player crash on Shader::SRPBatcherInfoSetup when opening player build
- [Android] FPS does not match the targeted FPS when it is set with Application.targetFrameRate
- RenderPipelineManager.activeRenderPipelineTypeChanged does not detect changes when changing the Render Pipeline Asset outside of Play Mode
- The Scene View becomes gray and "NullReferenceException" errors are thrown when attaching the Unity Editor process to RenderDoc
Resolution Note:
Compression speed is subjective to the type of content being compressed. Unity uses the Lz4 source directly for asset bundle compression, specifically using the Lz4HC variant at maximum compression levels which is slower to compress than standard Lz4, but achieves better file sizes while keeping the same fast Decompression speeds. In the case of these textures, the issue is the Lz4 source itself when using compression levels over the default level for Lz4HC. The Scriptable build pipeline (2018.2+) exposes the BuildCompression options used and they can set the compression level for Lz4HC to default (CompressionLevel.High) if they don't mind the extra file size. I would avoid changing the compression block size if an attempt to improve compression size or speed as this greatly impacts Decompression speeds.