Search Issue Tracker
By Design
Votes
0
Found in [Package]
2.0.0-preview.21
Issue ID
VGB-7
Regression
No
[Vector Graphics] Resolution loss and artifacts when importing SVG with the Vector Graphics package
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
4. Observe the Game view window
Expected result: SVG on the right looks the same as SVG seen on the left side
Actual result: Right SVG differs from the SVG seen on the left side
Reproducible with: 2.0.0-preview.6 (2021.3.28f1), 2.0.0-preview.21 (2021.3.28f1, 2022.3.6f1, 2023.1.5f1, 2023.2.0b1)
Could not test with: 2.0.0-preview.5 (2021.3.28f1) (Library\PackageCache\com.unity.vectorgraphics@2.0.0-preview.5\Runtime\InternalBridge\VectorImageBridge.cs(88,25): error CS0117: 'Vertex' does not contain a definition for 'settingIndex')
Reproduces on: Windows 10 Enterprise 21H2
Notes:
- SVG is imported from a script using the VectorUtils.VectorUtils.TessellateScene and VectorUtils.FillMesh methods
- The Tesselation is not uniform
- Looks like the StepDistance gets bigger and bigger over time with an increased resolution loss and artifacts: those are well visible with dashed strokes
- On the left, there is the correct result using the Sprite Renderer, while on the right the erroneous import via Script
- Could not test with Windows Standalone Player due to the right SVG not being rendered
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:
This is expected. The SamplingStepSize value should be equivalent to 1/"Sampling Steps" provided in the SVGImporter. So to have 100 steps, you would provide a value of 0.01 for the SamplingStepSize.
We may eventually either revise this API or fix the documentation for that behaviour.