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

Package: Vector Graphics

-

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

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.