Spline Mesher
3.2.Spline Mesher component
This component is a front-end for deforming a mesh along a spline. It holds all the various settings that control the mesh generation output. Which it outputs to a Mesh Filter component on the assigned Output Object.
Input/Output
Input: At the very least a Spline Container
component reference must be assigned. This specifies for which spline the mesh must be created.
Output: The object where the generated spline mesh gets assigned to. This must be an object with a Mesh Filter
and Mesh Renderer
component.
Collider
Here you can enable the generation of a collider mesh.
The “Box” type creates a box mesh that fits around the input mesh.
Distribution
Generally, a mesh is repeated and X number of times along the spline. As many times as it fits.
Deforming
Controls aspects of how the mesh is deformed along the spline.
The “Offset” parameter is most useful for creating multiple meshes along a shared spline. For example, guard rails next to a road.
Conforming
This remaps the spline’s sampled position to the geometry underneath it though raycasts. For instance, snapping a fence to the curvature of a terrain.
Events
It’s possible to call functions from other scripts, either before the mesh is being rebuild and/or after.
For example, you may want to update other aspects of your workflow once a mesh is finished rebuilding. For example, if a fence makes up an enclosure for animals, you may want to update a navmesh after it has been changed.
See the Scripting section for more details.