Search Issue Tracker
By Design
Votes
0
Found in
2019.3.0a1
2019.4
2019.4.19f1
2020.2
2021.1
2021.2
Issue ID
1314594
Regression
Yes
Not all 2D sprites get imported when upgrading a project from 2018.4
How to reproduce:
1. Open the project "FixTilesetBug.zip"
2. Extract the archive "TextureThatImportsWrong.zip"
3. Open the extracted texture "FoothillsGround0.png" in the Inspector
4. Observe the number of sprites (7)
Expected result: Texture is still divided into 11 sprites after upgrading the project
Actual result: Some sprites are missing
Reproducible with: 2019.3.0a1, 2019.4.20f1, 2020.2.5f1, 2021.1.0b7, 2021.2.0a4
Not reproducible with: 2018.4.32f1, 2019.2.21f1
Notes:
You can see the expected and actual result in the attached images
Comments (1)
-
edwardrowe
Feb 26, 2021 13:48
Thanks very much for helping track this down. I'm sorry that this was an issue on my end - these spaces are from an importer we wrote over a year ago to generate PhysicsShapes. Looks like we wrote this before 2018.4 introduced https://docs.unity3d.com/ScriptReference/Sprite.OverridePhysicsShape.html
Again, apologies. I hope it wasn't too hard to track down, as this helped me immensely in finding the bug on my end.
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
- Wrong shader appears when Particle System is added as a component
- Realtime Hard Shadows resolution of Spot Light and Point Light cannot be changed by script when using Universal Render Pipeline (URP)
- Warnings in the Package manager have no margin on the right side
- Errors are thrown in the Console and the Game view fails to render when RenderGraph Compatability is disabled and a Camera stack has a Pixel Perfect Camera Component with "Stretch Fill" Crop Frame
- [Linux] Crash on System.Runtime.InteropServices.Marshal:copy_from_unmanaged_fixed when accessing shared memory
Resolution Note (2021.2.X):
The issue is caused by extra blank lines being inserted in the meta file of the .png file after physicsShape. As far as we can tell those extra blank lines are not produced by Unity and are not supported by UnityYaml introduced in Unity 2019.3. To fix the sprites with this behaviour you can remove the empty lines in the meta file prior to the upgrade.
- serializedVersion: 2
name: 7_FoothillsGround0_BottomRightNeighborsWithoutCorner
rect:
serializedVersion: 2
x: 112
y: 32
width: 16
height: 16
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 43cfaeae629ec475dba1c59c21cd1d78
vertices: []
indices:
edges: []
weights: []