Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TexCoord2

The third set of UV coordinates of the vertex.
Read time 1 minuteLast updated 4 days ago

Definition

TexCoord2 = 6

Remarks

This attribute is optional. The attribute is used for texture mapping, as it defines the UV coordinates used to apply textures to a mesh's surface. Unity can use the tertiary UVs to store input data for real-time lightmap UVs.
UV coordinates are commonly represented using the Vector2 format, which consists of two 32-bit floating-point values, resulting in 8 bytes per vertex. If vertex compression is applied to this attribute, each component is compressed to 16-bit floating-point values, reducing the total to 4 bytes per vertex.
This attribute corresponds to the
TEXCOORD2
semantic in the HLSL shading language.
You can access vertex UVs using methods such as Mesh.GetUVs and Mesh.SetUVs.
For more information, refer to mesh vertex data.