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
- WebGL Player with WebGPU Graphics API fails to render Scene when custom Render Feature is used
- “EndLayoutGroup” error thrown when changing Shader Precision Model settings in Build Profiles window > Player Settings Overrides
- Button hover state uses default theme color when a custom .uss is applied
- Samples Showcase script warning does not clear after enabling required settings until GameObject is reselected
- VFX Particles receive shadow artifacts when using ShaderGraph with enabled shadows and Face Camera Plane Orient mode
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.