Search Issue Tracker
Duplicate
Votes
0
Found in
2019.1.8f1
2019.3
Issue ID
1170325
Regression
No
Texture2D.LoadImage returns true when it can not encode given data
To reproduce:
1. Create a new project
2. Create C# script
3. write
var tex = new Texture2D(32, 32);
var result = tex.LoadImage(System.Text.Encoding.ASCII.GetBytes(
"dfaw0ehfo0i23qnf2q3f9032qh90r2q30fh3092qhf0329qh092q3rj902q3h90f32qh9r03u902q3dj0923qhf90230qh09d32hq9032hq0932qh3r90q2"));
Debug.Log("Result is " + result);
4. Attach the script to game object
5. Press Play
Actual: Texture2D.LoadImage is returning true even when it can't decode the given data
Expected result: Texture2D.LoadImage should return false when can't decode the given data
Reproduced with: 2017.4.31f1; 2018.4.6f1;2019.1.14f1;2019.2.1f1; 2019.3.0a11
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 in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
This is a duplicate of issue #1008863