Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2021.1.X, 2021.2.X
Votes
2
Found in
2019.4
2019.4.26f1
2020.3
2021.1
2021.2
Issue ID
1336892
Regression
No
[Texture] Texture2D.LoadImage always returns true and sets the texture to question mark if loading failed
Reproduction steps:
1. Open project in "LoadTest.zip"
2. Open SampleScene
3. Enter Play Mode
Expected result: A white texture is displayed, because heic format is not supported (the Texture2D.LoadImage will return false in ImageLoader.cs, and the loading will fail)
Actual result: A texture with a question mark is displayed (even though heic format is not supported Texture2D.LoadImage will return true)
Reproducible with: 2019.4.27f1, 2020.3.9f1, 2021.1.8f1, 2021.2.0a18
Could not test with 2018.4.35f1 (scene breaks)
Note: https://docs.unity3d.com/540/Documentation/ScriptReference/Texture2D.LoadImage.html documentation for Texture2D.LoadImage says that it will return false when it fails to load the image, but it always returns true
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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a2.310
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0b6