CurveWall
A class in Root.Township, the global namespace.
Builds a wall mesh and matching MeshCollider along a Bezier spline of CurvePoints. Editor and level-design tool; it can be baked, after which the component removes itself and leaves the mesh.
- Listed in Global namespace: C to D
- Inherits or implements
MonoBehaviour,IBakeable - Nested types
CurvePoint - Attributes
RequireComponent
Constructors
| Member | What it is |
|---|---|
CurveWall() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
11 private and internal fields
| Member | What it is |
|---|---|
private MeshFilter filter | Cached MeshFilter holding the mesh. |
private float halfWidthBottom | Half the wall's width at the base. |
private float halfWidthTop | Half the wall's width at the top. |
private float height | Wall height along normalUp. |
private bool isGeneratingBottom | Whether to add faces under the wall. |
private Vector3 normalUp | Up direction used for height and side offsets. |
private int segments | Samples per spline segment. |
private List<CurveWall.CurvePoint> splineNodes | Backing field for SplineNodes. |
private float uvStretch | World length per UV unit along the wall. |
private float uvTopEnd | UV V value at one top edge. |
private float uvTopStart | UV V value at the other top edge. |
Properties
| Member | What it is |
|---|---|
bool IsBaked { get; set; } | True once baked; until then the mesh is flagged not to save into builds. |
List<CurveWall.CurvePoint> SplineNodes { get; } | The spline's nodes, for editor tools. |