The Unity documentation assumes I know what UV is…but I don’t. What is Mesh.UV and what is its purpose?
Their description is:
The base texture coordinates of the mesh.
Not helpful unless I already know what it is…
The Unity documentation assumes I know what UV is…but I don’t. What is Mesh.UV and what is its purpose?
Their description is:
The base texture coordinates of the mesh.
Not helpful unless I already know what it is…
Mesh.uv is an array of Vector2s that can have values between (0,0) and (1,1). The values represent fractional offsets into a texture. For example, (0,0) is the lower left corner and (0.5, 0.5) is the middle of the texture. When Mesh.uv exists (it is not required), there is a on-to-on map between the coordinates and and the vertices in Mesh.vertices. The practical uses is to be able to map arbitrary portions of the texture to specific triangles. For example, they allow you to create a cube in which each side is a different texture.
http://answers.unity3d.com/questions/542787/change-texture-of-cube-sides.html
If you Google “UV coordinates,” you will find in-depth presentation of this concept.
Mesh.uv is an array of Vector2s. The valid values are (0,0) to (1,1) and represent fraction values of the width and height of a texture. They map vertices to particular places on a texture. From a practical point of view, you can map some arbitrary portion of a texture into a triangle. If you Google “UV coordinates” you will find a number of web pages that explain the concept in detail.