Spline Mesher
6.Troubleshooting/FAQ
No mesh is created from a spline, nothing appears to happen If the spline is shorter than your input mesh is, no geometry can and will be created. Try making the spline longer.
Mesh is invisible when a prefab is loaded into the game Procedural meshes are always stored within the scene they are created in. Creating a prefab from a procedural mesh results in the data being lost. For prefabs, meshes need to be save to a file instead. Solution: Use the “FBX Exporter” package and export the spline mesh to an FBX, then drag that mesh onto the prefab’s Mesh Filter instead. Delete the Spline Mesher component to avoid it being overwritten again!
Fallback solution: Enable the “On Start()” option on the “Rebuild triggers” dropdown, this will regenerate the mesh the moment the prefab loads.
Error: Physics.PhysX cleaning the mesh failed This is the physics system telling you that the mesh collider is broken. This happens if the generated mesh is invalid for some reason, usually hard to achieve on purpose. For example, scaling the mesh or trimming it completely results in a mesh with 0 vertices, which is invalid.
In narrow corners the mesh appears to be malformed While this is an unwanted effect, it is technically normal. The mesh gets repeated along the spline curve’s length. But in very tight corners many vertices can end up overlapping. Mesh generation that collapses edges (of a cube) on the inside of corners is a very different concept to what this tool does.
Console errors
CollisionMeshData couldn't be created because the mesh has been marked as non-accessible. When using the Spline Mesher component at runtime, or in a build, the assigned input mesh must be readable. For imported meshes (eg. FBX files), be sure to enable the “Read/Write” option in the import settings. For C# generated meshes, mark the mesh as readable when creating it.
Partial method 'SplineMesher.UpdateCaps()' must have an implementation part because it has accessibility modifiers. You’ve updated to version 1.2.0+ from an older version. As of this version the asset installs as a package. Delete the Spline Mesher folder completely, then re-import it from the package manager. This imports everything in the right place.
Warning: Combine mesh instance 0 is null. This is an indication that your Spline Container contains a spline that has no knots or has a length of 0. Solution: Remove any empty splines from the container