Dynamically scripting rounded cube

I am trying to dynamically script rounded cubes since I need to apply a different texture to each side. Is there an example which I can refer to? I have done a plain cube without a problem.

Here is what I need to know:

  1. Is there some software which will graphically show me the different uv positions for a model? I need to know the order of the positions so that I can map the texture correctly.

  2. I have tried PrimitivesPro, but the vertices are too many. Is there a sample for dynamically scripting a curved quad in Unity? I can do the same for the cube.

Thanks,
Syed

Rounded corners require many vertices, since there’s no such thing as a curved quad. You’ll need to use a lot of regular quads that approximate a curve (the more quads, the more it looks like a rounded shape).

–Eric

In Blender I was able to create a beveled cube with as low as 192 vertices. I tried using this model in Unity and when I apply the texture dynamically such as
gameObject.renderer.material = atlasMaterial; and then apply the uv vertices based on the atlas texture, for some reason the model turns black. I will look at the vertices of this beveled cube and use it to create my own through script.

I still need to figure out the uv mapping positions. I mean which vertex would correspond to uv[0], uv[1] etc

Thanks