I am making 3d virtual keyboard and the keys are made from rectangular prism meshes with rounded corners / beveled edges. I made the mesh with blender and it works fine. Except that depending on device orientation etc the aspect ratio of the keys change. I have just been achieving this by doing a scale transform but it distorts the corner rounding.
In 2d this is handled with scale 9 algorithms which scale the middle and the length of the sides but not the corners.
Is there a common way of doing this in unity?
Maybe there is an easy way to render something with rounded corners after a transform on a regular cube?
Or to specify the way that a mesh scales with some areas remaking static?
Or building my own mesh with code? Is there a good example of this? Building a mesh of a rectangular prism seems doable - but rounding the corners seems like a formidable task.