Search Issue Tracker
By Design
Votes
1
Found in
2018.4
2019.4
2020.1
2020.1.0f1
2020.2
Issue ID
1265872
Regression
No
Transparent pixels are not returned when Texture2D GetPixels is called
How to reproduce:
1. Open attached project "GetPisxelBug.zip" and scene "scene"
2. Enter Play mode
3. In Hierarchy, select "renderer" object
4. In Inspector -> Example Class -> change 'Source Sprite' to '2', '4' or '6' image
5. Observe Console window
Expected result: 16384 is printed
Actual result: 16384 is not printed, "Array size must be at least width*height" error is thrown
Reproducible with: 2018.4.26f1, 2019.4.6f1, 2020.1.0f1, 2020.2.0a18
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 (2020.2.X):
TextureRect can be safely used only for sprites imported as Full Rect sprites.
All the sprites included in the repro project are imported in TightMesh mode and hence the issue.
To resolve the issue, please try to import the Sprites in FullRect mode.