Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

SVGParser.ImportSVG

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static Unity.VectorGraphics.SVGParser.SceneInfo ImportSVG(TextReader textReader, float dpi, float pixelsPerUnit, int windowWidth, int windowHeight, bool clipViewport);

Parameters

Parameter Description
textReader The reader object containing the SVG file data
dpi The DPI of the SVG file, or 0 to use the device's DPI
pixelsPerUnit How many SVG units fit in a Unity unit
windowWidth The default with of the viewport, may be 0
windowHeight The default height of the viewport, may be 0
clipViewport Whether the vector scene should be clipped by the SVG document's viewport

Returns

SceneInfo A SceneInfo object containing the scene data

Description

Kicks off an SVG file import.


Declaration

public static Unity.VectorGraphics.SVGParser.SceneInfo ImportSVG(TextReader textReader, Unity.VectorGraphics.ViewportOptions viewportOptions, float dpi, float pixelsPerUnit, int windowWidth, int windowHeight);

Parameters

Parameter Description
textReader The reader object containing the SVG file data
viewportOptions The viewport options to use
dpi The DPI of the SVG file, or 0 to use the device's DPI
pixelsPerUnit How many SVG units fit in a Unity unit
windowWidth The default with of the viewport, may be 0
windowHeight The default height of the viewport, may be 0

Returns

SceneInfo A SceneInfo object containing the scene data

Description

Kicks off an SVG file import.