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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
This is a duplicate of issue #1008863