How do i Extrude a 2D mesh(or Model) from one point to another?

Hello iv`e been trying to extrude mesh from 2 points(or multiple points) something like a

race track would any of you know how to achieve this method?

@Fattie

This is probably the most thorough break down of spline based meshes in Unity I’ve found. His examples use a 3D race track but the process is the same for 2D. He includes code samples too: Unite 2015 - A coder's guide to spline-based procedural geometry - YouTube