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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.