ドキュメント

Unity Engine


User Manual

Script Reference

Unity Engine


GetColors

Populates an array with the vertex colors from the MeshData.
読み終わるまでの所要時間 1 分最終更新 23日前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

GetColors(NativeArray<Color>)

Populates an array with the vertex colors from the
MeshData
.
public void GetColors(NativeArray<Color> outColors)

Parameters

The destination vertex colors array.

Remarks

The destination array must have at least vertexCount elements. The color at each index corresponds to the vertex with the same index. Vertex color data will be converted into Color or Color32 format if needed. Additional Resources: Mesh.GetColors, HasVertexAttribute, Mesh.AcquireReadOnlyMeshData.

GetColors(NativeArray<Color32>)

Populates an array with the vertex colors from the
MeshData
.
public void GetColors(NativeArray<Color32> outColors)

Parameters

The destination vertex colors array.

Remarks

The destination array must have at least vertexCount elements. The color at each index corresponds to the vertex with the same index. Vertex color data will be converted into Color or Color32 format if needed. Additional Resources: Mesh.GetColors, HasVertexAttribute, Mesh.AcquireReadOnlyMeshData.