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
- Shader warning after building a project with URP Sample
- MissingReferenceException after clicking "Fix now" on NormalMap settings
- The "UniversalRenderPipelineGlobalSettings.asset" is creating noise in the git diff when building a Player
- Scene is marked as dirty when opening the project with Vertical Layout Group added as a Component
- Crash on UnityEngine::Animation::SetGenericFloatPropertyValues when keyframing the RigBuilder component to Enabled and Disabled
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.