Generate regular polygons procedurally in Unity using custom meshes, apply UV mapping for textured shading, and preview the geometry live in the editor.
The only polygons that Unity provides built-in are quads.
In the previous video we showed how to create any n-sided regular convex polygon in Unity at runtime using a custom mesh.
We extend our custom mesh code to enable us to see the results in Unity when in edit mode by using the ExecuteAlways attribute, and the OnValidate function.