Scripting API

public class
Version 1.2.1
CurveLineRenderer : MonoBehaviour

Nested Classes

enum LineType Defines spline type


Enum Values

LineType LineType.Default Without smoothing of corners
LineType LineType.Rounded Corners are smoothed along the arc of given radius
LineType LineType.Splitted (Added in 1.1) Each segment is independent from other segments


Public constructors

CurveLineRenderer()


Variables

LineType type Type of the curve spline
float width Width of the curve spline
float radius A smoothing radius
float roundedAngle Specifies a offset of smoothing angle. Defines count of the fragments of smoothing corners  
Vector3 normal Normal, which defines the orientation of the spline in 3D space
bool reverseSideEnabled If the parameter is enabled, the reverse side of the spline will be drawn
List<Vector3> vertices Vertices of the spline


Functions

void SetVertices(List<Vector3> vertices)
Set the new list of vertices to the spline. Method calls a Invalidate()
void AddVertex(Vector3 vertex)
Add the new vertex to current list of vertices. Method calls a Invalidate()
void InsertVertex(int index, Vector3 vertex) (Added in 1.2.1)
Insert an element into the list of vertices at the specified index. Calls Invalidate()
void RemoveVertexAt(int index) (Added in 1.2.1)
Remove the vertex at the specified index of the list of vertices
void ClearVertices()
Clear the list of vertices. Method calls a Invalidate()
void Invalidate()
Invalidate the whole spline. Apply changes of fields and call redraw of spline
Mesh Rebuild(Mesh mesh) (Added in 1.1)
Builds a mesh for CurveLineRenderer script. Same mesh from method parameters will be
returned. Used for manually rebuild mesh from Unity Editor while EditMode is enabled

Комментариев нет:

Отправить комментарий