ImportSVG
Kicks off an SVG file import.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: Unity.VectorGraphics
- Assembly: UnityEngine.VectorGraphicsModule
ImportSVG(TextReader, float, float, int, int, bool)
Kicks off an SVG file import.
public static SVGParser.SceneInfo ImportSVG(TextReader textReader, float dpi = 0, float pixelsPerUnit = 1, int windowWidth = 0, int windowHeight = 0, bool clipViewport = false)
Parameters
The reader object containing the SVG file data
The DPI of the SVG file, or 0 to use the device's DPI
How many SVG units fit in a Unity unit
The default with of the viewport, may be 0
The default height of the viewport, may be 0
Whether the vector scene should be clipped by the SVG document's viewport
Returns
Type | Description |
|---|---|
| SceneInfo | A SceneInfo object containing the scene data |
ImportSVG(TextReader, ViewportOptions, float, float, int, int)
Kicks off an SVG file import.
public static SVGParser.SceneInfo ImportSVG(TextReader textReader, ViewportOptions viewportOptions, float dpi = 0, float pixelsPerUnit = 1, int windowWidth = 0, int windowHeight = 0)
Parameters
The reader object containing the SVG file data
The viewport options to use
The DPI of the SVG file, or 0 to use the device's DPI
How many SVG units fit in a Unity unit
The default with of the viewport, may be 0
The default height of the viewport, may be 0
Returns
Type | Description |
|---|---|
| SceneInfo | A SceneInfo object containing the scene data |