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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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.