UI Line Renderer
π UILineRenderer Class
A UI component for rendering customizable lines with width curves, color gradients, and rounded caps/corners.
Namespace:
Esper.SkillWeb.UI.UGUI
Inherits from:MaskableGraphic
Type:class
π¦ Fields
protected
cachedMaterial
Material
The instanced material cached when materialForRendering is called.
π§ Properties
public
material
Material
Gets or sets the material used for rendering.
public
LineWidth
float
Gets or sets the width of the line.
public
WidthCurve
AnimationCurve
Gets or sets the curve that controls line width along its length.
public
ColorGradient
Gradient
Gets or sets the gradient that controls line color along its length.
public
CornerVertices
int
Gets or sets the number of vertices used for rounded corners.
public
EndCapVertices
int
Gets or sets the number of vertices used for rounded end caps.
public
Loop
bool
Gets or sets whether the line should connect the last point to the first point.
public
mainTexture
Texture
Gets the main texture from the current material.
public
positionCount
int
Gets or sets the number of positions in the line.
public
materialForRendering
Material
Gets the material that will be used for rendering.
π§° Methods
public
GetCurrentMaterial()
Material
Gets the current material that should be used for rendering.
public
SetPosition(int, Vector2)
void
Sets the position of a specific point in the line.
public
GetPosition(int)
Vector2
Gets the position of a specific point in the line.
public
SetPositions(Vector2[])
void
Sets all positions in the line from an array.
public
SetPositions(List<Vector2>)
void
Sets all positions in the line from a list.
public
GetPositions(Vector2[])
int
Gets all positions in the line and copies them to the provided array.
public
AddPosition(Vector2)
void
Adds a new position to the end of the line.
public
RemovePosition(int)
void
Removes a position at the specified index.
public
ClearPositions()
void
Removes all positions from the line.
public
SetPosition3D(int, Vector3)
void
Sets the position of a specific point using a 3D vector (Z value is ignored).
public
SetPositions3D(Vector3[])
void
Sets all positions in the line from a 3D array (Z values are ignored).
protected
OnPopulateMesh(VertexHelper)
void
Populates the mesh with line vertices and triangles.
Last updated