Search Issue Tracker

By Design

Votes

0

Found in

2019.4

2019.4.24f1

2020.3

2021.1

2021.2

Issue ID

1340615

Regression

No

Image is not compressed when changing the compression format in OnPostprocessTexture and reimporting

Texture

-

How to reproduce:
1. Open the attached project "TexBug.zip"
2. Change platform to Android
3. Select '1_vr_T1_001' in the Project View
4. Under Android import settings change the Format to something else
5. Right-click '1_vr_T1_001' in the Project View
6. Click reimport

Expected result: The texture reimports and is compressed in the ASTC 6x6 block format
Actual result: The texture reimports and is not compressed in the ASTC 6x6 block format

Reproducible with: 2019.4.28f1, 2020.3.11f1, 2021.1.10f1, 2021.2.0a19
Could not test with: 2018.4.34f1 (fails to reimport texture)

Workaround: Reimport the texture twice

  1. Resolution Note:

    OnPostProcess is recommended against when trying to switch the compression format, closed by design.
    Link to docs: https://docs.unity3d.com/ScriptReference/AssetPostprocessor.OnPreprocessTexture.html and https://docs.unity3d.com/ScriptReference/AssetPostprocessor.OnPostprocessTexture.html
    Updated C# script can be found down below as well.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.