기술 자료

Unity Engine

Unity Engine

GetColors

Populates an array with the vertex colors from the MeshData.
읽는 시간 1분최근 업데이트: 한 달 전

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.