Search Issue Tracker
Won't Fix
Votes
1
Found in
2019.4
2019.4.16f1
2020.2
2021.1
2021.2
Issue ID
1309841
Regression
No
Editor does not reimport Texture2DArray when Build Target is changed
How to reproduce:
1. Open the attached "Texture2DArraySwitchPlatform.zip" Project on the Android platform
2. Navigate to "Assets > textures" in the Project view
3. Notice the compression on the "New Texture2DArray.texture2darray" and other files in the directory is ASTC 6x6
4. Make sure that Asset Pipeline in Project settings is set to Version 2
5. Change the platform to Windows
6. Inspect the compression on the "New Texture2DArray.texture2darray" file
Expected Behavior: The compression is "DXT1" since the array is made of "DXT1" assets
Actual Behavior: The compression is still "ASTC"
Reproducible with: 2019.4.20f1, 2020.2.4f1, 2021.1.0b6, 2021.2.0a4
Could not test with: 2018.4, could not create texture2d array
Note:
- After you reimport the asset manually - compression is right
- Customer attached a 5min repro video "unity-assetpipeline-v2-platformchange-reimport.mp4"
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
The custom importer wrote by the user, in that case, is using AssetImportContext.DependsOnSourceAsset to depend on a list of Textures used during the import.
Because this importer is not only referencing the textures but also use their values, it should use AssetImportContext.DependsOnArtifact instead.
The differences between both methods are explained in their respective documentation:
https://docs.unity3d.com/2020.2/Documentation/ScriptReference/AssetImporters.AssetImportContext.DependsOnSourceAsset.html
https://docs.unity3d.com/2020.2/Documentation/ScriptReference/AssetImporters.AssetImportContext.DependsOnArtifact.html
DependsOnSourceAsset should only be used when referencing an asset without reading its values.
DependsOnArtifact should be used whenever the import result depends on the values of the other asset.