ドキュメント

Unity Engine

Unity Engine

GetUVs

Populates an array with the UVs from the MeshData.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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

channel

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

channel

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

channel

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.