Search Issue Tracker
Won't Fix
Votes
4
Found in [Package]
2.0.0-preview.18
Issue ID
1403957
Regression
Yes
SVG asset's Rect Transform properties are reset to default values after updating Vector Graphics package
Reproduction steps:
1. Open the attached 'Vector Graphics issue' project
2. Open the 'SampleScene'
3. Observe the 'Ship' GameObject in the Inspector and make sure Width is set to 2500 and Height to 500
4. Make sure the 'Vector Graphics' package version is 2.0.0-preview.14 or below
5. Update the 'Vector Graphics' package version to 2.0.0-preview.18
6. Observe the 'Ship' GameObject in the Inspector
Expected result: Width and Height are not altered
Actual result: Width and Height are set to 100
Reproducible with: 2.0.0-preview.18 (2019.4.35f1, 2020.3.30f1, 2021.2.13f1, 2022.1.0b9, 2022.2.0a6)
Not reproducible with: 2.0.0-preview.17 (2019.4.35f1, 2020.3.30f1, 2021.2.13f1, 2022.1.0b9, 2022.2.0a6)
Notes:
- The same issue applies to all Rect Transform properties of the asset
- Updating to packages from 2.0.0-preview.15 to 2.0.0-preview.17 don't cause this issue
- Downgrading to 2.0.0-preview.14 makes Width and Height reset to original values
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
- Tile Palette selected dropdown text does not update when palette is renamed
- ArgumentException thrown and reference to Template gets unset when opening UXML file after editing referenced Template in Play mode
- [iOS][WebGL] Player freezes when multiple properties of a VisualElement are changed at the same time
- Warning 'GetControlID at event ValidateCommand returns a controlID different from the one in the Layout event' is logged when undoing the deletion of an Edited Freeform 2D Light
- ShadowCaster2D breaks on certain Rotation positions when Casting Source is set to PolygonCollider2D
Resolution Note:
Upgrading from 2.0.0-preview.14 may cause the Rect Transform to reset because we had to change the internal Transform ID of the component from the generated prefab. We did this to fix a bug where re-importing an asset would reset the transform:
https://issuetracker.unity3d.com/issues/svg-prefabs-transform-is-reset-when-renaming-the-prefab-asset-in-project-window
Unfortunately, the above fix basically broke the Transform ID imported from earlier Vector Graphics package versions. This should be a one-time situation, and shouldn't occur again if future Vector Graphics versions.