Procedural cable mesh generator for Unity.
This component builds a tube mesh from ordered control points, supports linear and Catmull-Rom interpolation, updates in Edit Mode and Play Mode, and can bake the generated result into a Mesh asset or Prefab.
Tested in Unity 6000.0.63f1 with the Built-in Render Pipeline.
- Generates a cable mesh from ordered point transforms
- Supports
LinearandCatmullRompath modes - Adjustable radius, side count, and UV tiling
- Optional double-sided geometry
- Automatic rebuild in Edit Mode and Play Mode
- Inspector buttons for adding points at the start or end
- Bake to Mesh asset
- Bake to Prefab
Copy ProceduralCableSkin.cs into your Unity project.
-
Create or select a GameObject with:
MeshFilterMeshRenderer
-
Add the
ProceduralCableSkincomponent. -
Assign ordered transforms to the
pointsarray. -
Adjust:
Path ModeSteps Per SegmentRadiusSidesUV Multiply
-
Use the inspector buttons:
Add StartAddBake MeshBake Prefab
- The component is marked with
ExecuteAlways, so it can rebuild in Edit Mode. - Editor-only functionality is wrapped in
#if UNITY_EDITOR. - Baking tools create mesh assets and prefabs directly from the generated cable mesh.
- Unity:
6000.0.63f1 - Render Pipeline:
Built-in
ProceduralCableSkin.cs— runtime component and custom inspector
MIT

