Search Issue Tracker
Won't Fix
Votes
11
Found in
2021.3.33f1
2022.3.14f1
2023.2.3f1
2023.3.0a17
Issue ID
UUM-57866
Regression
Yes
Texture becomes lower quality when the texture is downloaded with script
Reproduction steps:
1. Open the attached "(FAV) PROJECTFILE" project
2. Open the "Assets/Scenes/SampleScene 1.unity" scene
3. Enter the Play mode
4. Observe the Game view
Expected result: The “Original” and “Downloaded” textures have the same quality and have no differences
Actual result: The “Downloaded” texture quality is lower compared to the “Original” image
Reproducible with: 2021.3.29f1, 2021.3.33f1, 2022.3.14f1, 2023.2.3f1, 2023.3.0a17
Not reproducible with: 2021.3.28f1
Reproducible on: macOS Sonoma 14.1.1 (M1 Max), Windows 11
Not reproducible on: No other environment tested
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
- The Scrollbar becomes unusable when adding Elements to the List
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
Resolution Note:
In the provided sample it's the opposite: the original is of lower quality, while downloaded image looks like what is seen if opened in web browser.
The reason for the difference is because UnityWebRequest after latest changes creates texture with mipmaps enabled, while image in Unity project does not have them. Enabling mip maps for the texture in Unity project makes the "original" image look the same as downloaded. I can get the other way around by adding this code:
var copy = new Texture2D(myTexture.width, myTexture.height, myTexture.format, false);
Graphics.CopyTexture(myTexture, 0, 0, copy, 0, 0);
We plan to add public APIs to UnityWebRequest for controlling mipmap in the future. For now if you want a texture without mipmaps, use regular download and convert downloaded image bytes to texture using ImageConversion class.