Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2018.4.13f1
2020.2
Issue ID
1249251
Regression
No
Sprites have different pixel density when using the same Pixel Per Unit parameter after applying the Texture2D.Resize function
How to reproduce:
1. Open the attached project "case_1249251-Project.zip"
2. Extract the "SpritePostProcess.cs.zip" located in the Assets folder (to import the Asset PostProcessor)
3. Select the "Circle1" Asset
4. In the Inspector, increase the Extrude Edges parameter by 1
5. Click the "Apply" button
6. Select the "Circle4" Asset
7. In the Inspector, increase the Extrude Edges parameter by 4
8. Click the "Apply" button
9. Add the different sliced Sprites to the Scene
10. Observe the added Sprites
Expected result: Sprite pixel density is the same when using the same Pixels Per Unit parameter
Actual result: Sprites have different pixel density when using the same Pixel Per Unit parameter
Reproducible with: 2018.4.26f1, 2019.4.9f1, 2020.1.4f1, 2020.2.0a21
Note: Sprite slices are misaligned in the Sprite Editor but correct slices are done in the Scene View after Asset PostProcessing
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
Resolution Note (2021.1.X):
SpriteRects are meta data based on the art asset itself and not the texture that is generated.
To properly do this, you would have to change the art asset itself and not the texture it generates.