Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Mesh.GetTriangles

GetTriangles(submesh: int): int[];
int[] GetTriangles(int submesh);
def GetTriangles(submesh as int) as int[]

Description

Returns the triangle list for the submesh.

A submesh is simply a separate triangle list. When the mesh renderer uses multiple materials, you should ensure that there are as many submeshes as materials.

See Also: subMeshCount.