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
- Inspector elements are rendered twice when the script component is added via drag-and-drop while the HideFlags.HideInInspector property is set
- Error "Light baking failed with error code 5 (Convergence data not available while rendering lightmaps)" thrown in Console when generating lighting for specific GameObjects
- Copy and Paste options for an Animation Property value are disabled in the Right click contextual menu
- Asset is not found when searching the Label "NewLabel" in Search Window
- "Compute dispatch: missing texture ID..." and "Compute dispatch: missing UAV ID..." warnings are thrown after changing the platform in High Definition 3D template
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.