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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
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.