GetColors
Populates an array with the vertex colors from the MeshData.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
GetColors(NativeArray<Color>)
Populates an array with the vertex colors from the .
MeshDatapublic 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 .
MeshDatapublic 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.