Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SVGImporter

The SVG importer class.
Read time 5 minutesLast updated 12 days ago

Definition

[HelpURL("ui-systems/work-with-vector-graphics")][ScriptedImporter(9, "svg")]public sealed class SVGImporter : ScriptedImporter

Properties

Property

Description

AdvancedModeUse advanced settings.
AlignmentThe SVG sprite alignement.
CustomPivotThe custom pivot, when alignement is "Custom".
FilterModeThe filter mode of the texture (only used when importing to a texture).
GeneratePhysicsShapeAutomaticallly generates a physics shape.
GradientResolutionMaximum resolution for gradient texture.
KeepTextureAspectRatioThe size of the texture (only used when importing to a texture).
MaxCordDeviationDistance on the cord to a straight line between two points after which more tessellation will be generated.
MaxCordDeviationEnabledEnables the "max coord deviation" constraint.
MaxTangentAngleMax tangent angle (in degrees) after which more tessellation will be generated.
MaxTangentAngleEnabledEnables the "max tangent angle" constraint.
PredefinedResolutionIndexThe predefined resolution used, when not in advanced mode.
PreserveSVGImageAspectWhen importing to an SVGImage, preserves the aspect ratio of the generated sprite.
ResolutionMultiplierAn additional scale factor on the target resolution.
SampleCountThe number of samples per pixel (only used when importing to a texture).
SamplingStepDistanceNumber of samples evaluated on paths.
StepDistanceThe uniform step distance used for tessellation.
SvgPixelsPerUnitThe number of pixels per Unity units.
SvgTypeHow the SVG file will be imported
TargetResolutionThe target resolution on which this SVG is displayed.
TessellationModeThe serialization mode used when importing the SVG document.
TexturedSpriteMeshTypeFor textured sprite, the mesh type
TextureHeightThe height of the texture (only used when importing to a texture).
TextureSizeThe size of the texture (only used when importing to a texture with "keep aspect ratio").
TextureWidthThe width of the texture (only used when importing to a texture).
UseSVGPixelsPerUnitWhen importing as a textured sprite asset, uses the SVG size to compute the pixels per unit.
ViewportOptionsViewport options to use when importing the SVG document.
WrapModeThe wrap mode of the texture (only used when importing to a texture).

Methods

Method

Description

OnImportAssetImports an SVG asset

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.