Search Issue Tracker
Fixed in 2019.3.X
Votes
0
Found in
2017.4.0f1
2018.3.0a1
2018.4.0f1
2019.1.0a1
2019.1.6f1
2019.2.0a1
2019.3.0a1
Issue ID
1162624
Regression
No
It's not possible to create Texture2DArray with Compression because It doesn't have SetRawTextureData/GetRawTextureData
To reproduce:
1. Download attached "update Texture Array content at runtime.zip" project and open in Unity
2. Open "Texture2DArray" scene
3. Select "Main Camera" gameObject
4. In the Inspector window navigate to "Texture 2D Array Exporter" component
5. Click over the Gear icon and then press Run Good Test - Texture2DArray is not Compressed and observe that it Draws the Image correctly
6. Click over the Gear icon and then press Run Bad Test - Texture2DArray is Compressed and observe that it does not Draw the Image and trows Warning and Error:
Reproduced on Unity 2017.4.0f1, 2017.4.27f1, 2018.3.14f1, 2018.4.2f1, 2019.1.7f1, 2019.2.0b6 and 2019.3.0a6
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
- Mouse inputs cannot be inputted when searching the Shortcuts Menu by type "Shortcut"
- "Debug Assertion Failed!" error when launching Windows Dedicated Server Player with Script Debugging enabled
- [Cinematic Studio][3D HDRP] Shader warnings thrown in the Console window when creating a new project with Cinematic Studio template
- Autoplay is triggered on Audio Assets when changing Asset Bundle tags
- Inspector Asset Bundle section has no indication for Variants, AssetBundle is written without a space, and Variant dropdown menu is available without setting the Asset Bundle first
Resolution Note (fix version 2019.3):
Using older APIs like SetPixel/SetPixels will still produce errors and that is intended behaviour. A new API called SetPixelData was added to Texture2D, Texture2DArray, Texture3D, Cubemap and CubemapArray to allow setting these texture types with any user-supplied data.
Previously reported errors are intended & by design, i.e. when a user tries to set a texture to use an unsupported format via SetPixel and similar, similar errors will be produced:
"‘ETC2_RGBA8’ is not supported on this platform. Decompressing texture. Use ‘SystemInfo.SupportsTextureFormat’ C# API to check format support.
UnityEngine.Texture2DArray:.ctor(Int32, Int32, Int32, TextureFormat, Boolean)
Texture2DArrayExporter:RunTest() (at Assets/Scripts/Texture2DArrayExporter.cs:36)
Texture2DArrayExporter:BadTest() (at Assets/Scripts/Texture2DArrayExporter.cs:21)"
"Unsupported TextureFormat(47) for SetPixel operations.
UnityEngine.Texture2DArray:SetPixels(Color[], Int32, Int32)
Texture2DArrayExporter:RunTest() (at Assets/Scripts/Texture2DArrayExporter.cs:42)
Texture2DArrayExporter:BadTest() (at Assets/Scripts/Texture2DArrayExporter.cs:21)"