Legacy Documentation: Version 5.3
LanguageEnglish
  • C#
  • JS

Script language

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

Mesh.GetTriangles

Switch to Manual
public int[] GetTriangles(int submesh);

Parameters

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.