unity build_error ai_generated true

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

Also available as: JSON · Markdown · 中文
95%Fix Rate
90%Confidence
1Evidence
2023-12-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
Unity 2022.3 active
Unity 2023.2 active
WebGL 2023 active
iOS 16 active

Root Cause

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.

generic

中文

纹理使用了目标构建平台(例如WebGL、iOS)不支持的GPU压缩格式(例如DXT1、BC7),导致导入失败。

Official Documentation

https://docs.unity3d.com/Manual/class-TextureImporter.html

Workarounds

  1. 95% success 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.
    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.
  2. 90% success 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.
    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.

中文步骤

  1. 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.
  2. 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.

Dead Ends

Common approaches that don't work:

  1. 40% fail

    Converting the .dds to .png in an external tool without changing compression settings in Unity still fails because the importer detects the original format.

  2. 50% fail

    Enabling 'Override for WebGL' but keeping the same DXT1 format does not help; the platform override must change the format to ASTC or ETC2.