Spline Mesher - Pro
4.Scripting
Whenever using the API, ensure you add using sc.splinemesher.pro.runtime; to include the namespace.
Accessing settings
Both the Spline Curve Mesher and Spline Fill Mesher components have a settings class instance, which in turn has various sub-class instances (eg. Distribution, Scale, Collider etc). They are laid out almost identically to how they’re presented in the inspector UI, so specific settings are straightforward to find.
You are encouraged to explore the settings instance in your IDE.

Rebuild() after you’ve finished making changes.A few helper functions are in place:
Spline Curve Mesher
SetInputMesh(Mesh mesh)AssignMaterials(Material[] materials)
Spline Fill Mesher
SetMaterial(Material material)
Manual rebuilding
Both the Spline Curve Mesher and Spline Fill Mesher components have a Rebuild() function, which will trigger a regeneration of the entire mesh. An optional splineIndex parameter can be passed on to rebuild for a specific spline.
This needs to be used when altering any component settings through script.
Dispose() function where you are sure the Spline Mesher is no longer needed, this clears up memory.Spline rebuild triggers
If you have the OnSplineAdded, OnSplineChanged or OnSplineRemoved rebuild triggers disabled, you’d also need to manage the spline cache manually through the respective AddCachedSpline, UpdateCachedSpline, RemoveCachedSpline functions.
This is needed to update the internal spline cache, which is used for the mesh generation. Without doing so, the mesh gets rebuild based on outdated spline data.
Editor tools
The sc.splinemesher.pro.editor.SplineMesherEditor class contains a few public static functions, for use in custom tooling and pipelines:
- GenerateLODS (with overloads for specific scenes and meshers)
- GenerateLightmapUVs (with an overload for a list of meshers)
