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

VectorUtils

class in Unity.VectorGraphics

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

Description

Provides various tools to work with vector graphics.

Static Properties

Property Description
EpsilonA small value used everywhere by the vector graphics package.

Static Methods

Method Description
ApproximateSceneNodeBoundsComputes a rough approximation of the node hierarchy bounds.
BezierSegmentsToPathConverts an array of BezierSegments into a connected path.
BezierSegmentToPathConvert a segments into a path.
BoundsComputes the bounds of a bezier path.
BuildRectangleContourBuilds a BezierContour from a Rectangle.
BuildSpriteBuilds a sprite asset from a scene tessellation.
BuildVectorImageBuilds a sprite asset from a scene tessellation.
EvalEvaluates the position on a curve segment.
EvalFullEvalutes both the position and tangent on a curve segment.
EvalNormalEvalutes the normal on a curve segment.
EvalTangentEvaluates the tangent on a curve segment.
FillMeshFills a mesh geometry from a scene tessellation.
FillUVsFill the UVs of the geometry using the provided texture atlas.
FindBezierLineIntersectionsFind the intersections (up to three) between a line and a curve segment.
FlipSegmentFlips a segment direction.
FlipVerticesInBoundsFlip the vertices (in-place) inside their axis-aligned bounding-box.
GenerateAtlasGenerates a Texture2D atlas containing the textures and gradients for the vector geometry.
GenerateAtlasAndFillUVsGenerates a Texture2D atlas containing the textures and gradients for the vector geometry, and fill the UVs of the geometry.
IntersectLinesFinds the intersection between two infinite lines
IntersectLineSegmentsFinds the intersection between two line segments
MakeArcApproximates a circle arc with up to 4 segments.
MakeCircleShapeBuilds a circle shape.
MakeEllipseShapeBuilds an ellipse shape.
MakeLineBuilds a line segment.
MakePathLineBuilds a line path segment.
MakeRectangleShapeBuilds a rectangle shape.
PathEndsPerfectlyMatch Checks if the two ends of a BezierPathSegment chain are at the same location.
PathSegmentAtIndex Computes the BezierSegment at a given index from a list of BezierPathSegments.
QuadraticToCubicConverts a quadratic bezier to a cubic bezier
RealignVerticesInBoundsRealigns the vertices (in-place) inside their axis-aligned bounding-box.
RenderSpriteDraws a vector sprite using the provided material.
RenderSpriteToTexture2DRenders a vector sprite to Texture2D.
SceneNodeBoundsComputes a pretty accurate approximation of the scene bounds.
SceneNodesLists every nodes under a root node.
SegmentLengthComputes the length of a single curve segment.
SegmentsInPathIterates through every segment in a list of path segments.
SegmentsLengthComputes the combined length of a segment chain.
SegmentsLengthsComputes the individual lengths of a segment chain.
SplitSegmentSplits a curve segment at a given parametric location.
TessellatePath Tessellates a path.
TessellateRectTessellates a rectangle.
TessellateRectBorderTessellates a rectangle border.
TessellateSceneTessellates a Scene object into triangles.
TransformBezierPathTransforms a path by a transformation matrix.
TransformSegmentTransforms a curve segment by a translation, rotation and scaling.
WorldTransformedSceneNodesIterates through every nodes under a root with computed transform and opacities.