GetUVs
Populates an array with the UVs from the MeshData.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
GetUVs(int, NativeArray<Vector2>)
Populates an array with the UVs from the MeshData.
public void GetUVs(int channel, NativeArray<Vector2> outUVs)
Parameters
The UV channel, in [0..7] range.
The destination texture coordinates array.
Remarks
The destination array must have at least vertexCount elements. The UV at each index corresponds to the vertex with the same index. Texture coordinate data will be converted into Vector2, Vector3 or Vector4 format as needed. Additional Resources: Mesh.GetUVs, HasVertexAttribute, Mesh.AcquireReadOnlyMeshData.
GetUVs(int, NativeArray<Vector3>)
Populates an array with the UVs from the MeshData.
public void GetUVs(int channel, NativeArray<Vector3> outUVs)
Parameters
The UV channel, in [0..7] range.
The destination texture coordinates array.
Remarks
The destination array must have at least vertexCount elements. The UV at each index corresponds to the vertex with the same index. Texture coordinate data will be converted into Vector2, Vector3 or Vector4 format as needed. Additional Resources: Mesh.GetUVs, HasVertexAttribute, Mesh.AcquireReadOnlyMeshData.
GetUVs(int, NativeArray<Vector4>)
Populates an array with the UVs from the MeshData.
public void GetUVs(int channel, NativeArray<Vector4> outUVs)
Parameters
The UV channel, in [0..7] range.
The destination texture coordinates array.
Remarks
The destination array must have at least vertexCount elements. The UV at each index corresponds to the vertex with the same index. Texture coordinate data will be converted into Vector2, Vector3 or Vector4 format as needed. Additional Resources: Mesh.GetUVs, HasVertexAttribute, Mesh.AcquireReadOnlyMeshData.