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
- The Scene View becomes gray and "NullReferenceException" errors are thrown when attaching the Unity Editor process to RenderDoc
- Memory usage rapidly rises when changing colors in the color wheel
- Physically Based Sky's Horizon and Zenith Tint Color Selection Bars don't have immediate access to color pickers
- EmptyAdditionalLightShadowmapTexture leaks from memory when URP quality level is changed using QualitySettings.SetQualityLevel
- Referenced ScriptableObject field does not get updated and cannot be set to "None" when there are no Objects of that type
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.