Gist 07d372884fec99f6d8785ba677d2fa2d
✓ Published0🌍 Public
Aandybak
Last edited Jul 28, 2024
Created on Jul 27, 2024
This example shows a Unity scene converting SVG path data into spline-based curves for use in a SplineContainer. It parses an SVG file using `RuntimeSVGImporter` and `SVGParser.SceneInfo`, then iterates through the scene’s shape contours, converting each Bézier segment into a `BezierKnot` within a new `Spline`. The code applies translation, rotation, and scaling transforms to the points before adding them, and it supports extracting a single node by ID or child index. The result is a set of splines representing the original vector graphics, ready for manipulation in Unity’s spline system.
AI-generated description