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
- UI Toolkit meshes are fully rendered and rasterized when opacity is 0
- Light rendering artefacts appear in the Editor when assigning unsupported 3D Custom Render Texture in Camera’s Output Texture, unclearable errors and warnings spammed
- Memory leak when running a test with "GfxThreadingMode" set to "SplitJobs"
- Loading Unloaded unsaved Scene throws “ArgumentException” error in the Console
- Crash on std::__1::__tree_const_iterator when opening the Build Profiles window in a specific project
This is a duplicate of issue #1008863