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 Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
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.