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

VectorUtils.BuildSprite

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 Sprite BuildSprite(List<Geometry> geoms, float svgPixelsPerUnit, Unity.VectorGraphics.VectorUtils.Alignment alignment, Vector2 customPivot, ushort gradientResolution, bool flipYAxis);

Parameters

Parameter Description
geoms The list of tessellated Geometry instances
svgPixelsPerUnit How many SVG "pixels" map into a Unity unit
alignment The position of the sprite origin
customPivot If alignment is Alignment.Custom, customPivot is used to compute the sprite origin
gradientResolution The maximum size of the texture holding gradient data
flipYAxis True to have the positive Y axis to go downward.

Returns

Sprite A new Sprite containing the provided geometry. The Sprite may have a texture if the geometry has any texture and/or gradients

Description

Builds a sprite asset from a scene tessellation.


Declaration

public static Sprite BuildSprite(List<Geometry> geoms, Rect rect, float svgPixelsPerUnit, Unity.VectorGraphics.VectorUtils.Alignment alignment, Vector2 customPivot, ushort gradientResolution, bool flipYAxis);

Parameters

Parameter Description
geoms The list of tessellated Geometry instances
rect The position and size of the sprite geometry
svgPixelsPerUnit How many SVG "pixels" map into a Unity unit
alignment The position of the sprite origin
customPivot If alignment is Alignment.Custom, customPivot is used to compute the sprite origin
gradientResolution The maximum size of the texture holding gradient data
flipYAxis True to have the positive Y axis to go downward.

Returns

Sprite A new Sprite containing the provided geometry. The Sprite may have a texture if the geometry has any texture and/or gradients

Description

Builds a sprite asset from a scene tessellation.