Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

Mesh.GetTriangles

public function GetTriangles(submesh: int): 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.