# BuildSprite

> Builds a sprite asset from a scene tessellation.

## Definition

* **Type:** Method
* **Namespace:** [Unity.VectorGraphics](/engine/6000.5/script-reference/unity/vectorgraphics.md)
* **Assembly:** UnityEngine.VectorGraphicsModule

## BuildSprite(List\<Geometry>, float, Alignment, Vector2, ushort, bool)

Builds a sprite asset from a scene tessellation.

```csharp
public static Sprite BuildSprite(List<VectorUtils.Geometry> geoms, float svgPixelsPerUnit, VectorUtils.Alignment alignment, Vector2 customPivot, ushort gradientResolution, bool flipYAxis = false)
```

### Parameters

**** (\[List\<Geometry>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): The list of tessellated Geometry instances**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How many SVG "pixels" map into a Unity unit**** (\[Alignment]\(/engine/6000.5/script-reference/unity/vectorgraphics/vectorutils/alignment)): The position of the sprite origin**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): If alignment is [VectorUtils.Alignment.Custom](/engine/6000.5/script-reference/unity/vectorgraphics/vectorutils/alignment/custom.md), customPivot is used to compute the sprite origin**** (\[ushort]\(https\://learn.microsoft.com/dotnet/api/system.uint16)): The maximum size of the texture holding gradient data**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): True to have the positive Y axis to go downward.

### Returns

| Type                                                            | Description                                                                                                                   |
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [Sprite](/engine/6000.5/script-reference/unityengine/sprite.md) | A new Sprite containing the provided geometry. The Sprite may have a texture if the geometry has any texture and/or gradients |

## BuildSprite(List\<Geometry>, Rect, float, Alignment, Vector2, ushort, bool)

Builds a sprite asset from a scene tessellation.

```csharp
public static Sprite BuildSprite(List<VectorUtils.Geometry> geoms, Rect rect, float svgPixelsPerUnit, VectorUtils.Alignment alignment, Vector2 customPivot, ushort gradientResolution, bool flipYAxis = false)
```

### Parameters

**** (\[List\<Geometry>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): The list of tessellated Geometry instances**** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): The position and size of the sprite geometry**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): How many SVG "pixels" map into a Unity unit**** (\[Alignment]\(/engine/6000.5/script-reference/unity/vectorgraphics/vectorutils/alignment)): The position of the sprite origin**** (\[Vector2]\(/engine/6000.5/script-reference/unityengine/vector2)): If alignment is [VectorUtils.Alignment.Custom](/engine/6000.5/script-reference/unity/vectorgraphics/vectorutils/alignment/custom.md), customPivot is used to compute the sprite origin**** (\[ushort]\(https\://learn.microsoft.com/dotnet/api/system.uint16)): The maximum size of the texture holding gradient data**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): True to have the positive Y axis to go downward.

### Returns

| Type                                                            | Description                                                                                                                   |
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [Sprite](/engine/6000.5/script-reference/unityengine/sprite.md) | A new Sprite containing the provided geometry. The Sprite may have a texture if the geometry has any texture and/or gradients |
