Static Mesh Triangle Count

Not sure if this is the best way, but this is the solution I’m using:

triangle_count = 0

num_sections = static_mesh.get_num_sections(0)
for section_number in range(num_sections): section_data = unreal.ProceduralMeshLibrary.get_section_from_static_mesh(static_mesh, 0, section_number)
triangle_count += len(section_data[1])

total_triangles = triangle_count / 3

If anyone finds a more elegant solution, feel free to add it here.

1 Like