unity
build_error
ai_generated
true
无法导入资源: 'Assets/Textures/terrain_dxt1.dds'。错误: 此平台(WebGL)不支持DXT1纹理压缩格式
Failed to import asset: 'Assets/Textures/terrain_dxt1.dds'. Error: Texture compression format DXT1 is not supported on this platform (WebGL)
ID: unity/asset-importer-crash-dds
95%修复率
90%置信度
1证据数
2023-12-01首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Unity 2022.3 | active | — | — | — |
| Unity 2023.2 | active | — | — | — |
| WebGL 2023 | active | — | — | — |
| iOS 16 | active | — | — | — |
根因分析
纹理使用了目标构建平台(例如WebGL、iOS)不支持的GPU压缩格式(例如DXT1、BC7),导致导入失败。
English
The texture uses a GPU-compressed format (e.g., DXT1, BC7) that is not supported by the target build platform (e.g., WebGL, iOS), causing import failure.
官方文档
https://docs.unity3d.com/Manual/class-TextureImporter.html解决方案
-
In the Inspector, select the texture asset, go to the 'Platform Override' section for the target platform (e.g., WebGL), and change the compression format to a supported one like ASTC (6x6) or ETC2 (RGBA). Example: For WebGL, set Format to ASTC_RGBA_6x6.
-
If the original .dds file is not needed, reimport the texture as a lossless format (e.g., .png or .tga) and let Unity compress it automatically for the target platform.
无效尝试
常见但无效的做法:
-
40% 失败
Converting the .dds to .png in an external tool without changing compression settings in Unity still fails because the importer detects the original format.
-
50% 失败
Enabling 'Override for WebGL' but keeping the same DXT1 format does not help; the platform override must change the format to ASTC or ETC2.