I’ve an Icosphere GameObject:
I need to iterate over every of the faces and alter the fabric primarily based on their distance from the middle, nevertheless I do not appear to have the ability to retrieve the listing of vertices for the article:
void Begin()
{
// Works
_planetRenderer = GetComponent<Renderer>();
_planetRenderer.sharedMaterial = Supplies.First(m => m.title == "Sand");
// Cannot retrieve vertices
MeshFilter gameObjMeshFilter = GetComponent<MeshFilter>();
Debug.Log($"Middle: {rework.place}");
Debug.Log($"Mesh Depend: {gameObjMeshFilter.mesh.vertices.Size}");
}
The vertexCount is returned as 43530, however vertices is an empty array: