Class SplineExtrude
A component for creating a tube mesh from a Spline at runtime.
Inherited Members
Component.GetComponentIndex()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Scene)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.Splines
Assembly: Unity.Splines.dll
Syntax
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))]
[AddComponentMenu("Splines/Spline Extrude")]
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 |
---|---|
bool |
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 |
---|---|
float |
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 |
---|---|
int |
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 |
---|---|
bool |
SegmentsPerUnit
How many edge loops comprise the one unit length of the mesh.
Declaration
public float SegmentsPerUnit { get; set; }
Property Value
Type | Description |
---|---|
float |
Sides
How many sides make up the radius of the mesh.
Declaration
public int Sides { get; set; }
Property Value
Type | Description |
---|---|
int |
Spline
The main Spline to extrude.
Declaration
public Spline Spline { get; }
Property Value
Type | Description |
---|---|
Spline |
Splines
The Splines to extrude.
Declaration
public IReadOnlyList<Spline> Splines { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Spline> |
Methods
Rebuild()
Triggers the rebuild of a Spline's extrusion mesh and collider.
Declaration
public void Rebuild()