Class SplineExtrude
A component for creating a tube mesh from a Spline at runtime.
Namespace: UnityEngine.Splines
Syntax
public class SplineExtrude : MonoBehaviour
Properties
capped
Whether the start and end of the mesh is filled. This setting is ignored when spline is closed.
Declaration
public bool capped { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
container
The SplineContainer of the Spline to extrude.
Declaration
public SplineContainer container { get; set; }
Property Value
Type | Description |
---|---|
SplineContainer |
radius
The radius of the extruded mesh.
Declaration
public float radius { get; set; }
Property Value
Type | Description |
---|---|
Single |
range
The section of the Spline to extrude.
Declaration
public Vector2 range { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
rebuildFrequency
The maximum number of times per-second that the mesh will be rebuilt.
Declaration
public int rebuildFrequency { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
rebuildOnSplineChange
Enable to regenerate the extruded mesh when the target Spline is modified. Disable this option if the Spline will not be modified at runtime.
Declaration
public bool rebuildOnSplineChange { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
segmentsPerUnit
How many edge loops comprise the one unit length of the mesh.
Declaration
public float segmentsPerUnit { get; set; }
Property Value
Type | Description |
---|---|
Single |
sides
How many sides make up the radius of the mesh.
Declaration
public int sides { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
spline
The Spline to extrude.
Declaration
public Spline spline { get; }
Property Value
Type | Description |
---|---|
Spline |
Methods
Rebuild()
Triggers the rebuild of a Spline's extrusion mesh and collider.
Declaration
public void Rebuild()