- Home /
Unwrap UV of a Mesh in Unity Editor
How can I unwrap the uvs of a mesh I created via scripting in the Unity Editor? I know of Unwrapping.GeneratePerTriangleUV in the Editor, but I do not know how to use the output of that function as I asked here.
If you created the mesh programmatically, then surely you assigned the UVs programmatically as well, so there's no unwrapping to be done?
With the meshes I have, I need to use a UV Unwrap algorithm. But I need to run this algorithm through many meshes automatically, so I can't just export my meshes and throw it through Blender to generate UV's for each mesh. I would have to export about 60+ meshes and chuck it through Blender, and reimport, so thats a waste of time.
The meshes I have aren't simple shapes like a cube, so I can't "brute force" uv's.
What tanoshimi ment was, when you generate your mesh procedurally you usually create the UV coordinates as well procedurally. We can't tell you how you should create those since we don't know how that mesh you generate looks like and how you acually want to map your texture to your mesh.
Without more details about your mesh we can't suggest anything. There is nothing like a general / generic fully automated UV coordinates generator.