Search Issue Tracker
By Design
Votes
1
Found in [Package]
2.0.0-preview.16
Issue ID
1330158
Regression
No
Shape.Countours will be incorrect for a shape which has rotated geometry
How to reproduce:
1. Open the attached project "TEST.zip"
2. Open SampleScene
3. Click Play
4. Observe the Game View
Expected result: You see a rotated ellipse with a rotated red outline
Actual result: You see a rotated ellipse with a not rotated red outline
Reproducible with: 2.0.0-preview.6 - 2.0.0-preview.16 (2018.4.34f1, 2019.4.27f1, 2020.3.9f1, 2021.1.8f1, 2021.2.0a17)
Could not test with: 1.0.0-preview.13 - 2.0.0-preview.5 ('Vertex' does not contain a definition for 'settingIndex')
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
The method VectorUtils.TessellateScene() will apply the transformation matrix defined in the SVG asset before returning the geometry. If you take the contour data directly from the vector Scene, it is your responsibility to apply the same transformation matrix on the bezier contour data.
The transform can be found on the corresponding SceneNode.Transform property of the scene.
An alternative solution to generate the contour would be to add a Stroke to the Shape instance associated with the node. Then, VectorUtils.TessellateScene() will generate the contour with proper transform.