Class Submesh
Defines a set of indices and material.
Inherited Members
Namespace: UnityEngine.ProBuilder
Assembly: Unity.ProBuilder.dll
Syntax
[Serializable]
public sealed class Submesh
Constructors
Name | Description |
---|---|
Submesh(int, MeshTopology, IEnumerable<int>) | Creates a new Submesh from a submesh index for the material, the topology, and a set of indices. |
Submesh(Mesh, int) | Creates a new Submesh from a source mesh and a submesh index for the material. |
Properties
Name | Description |
---|---|
indexes | Gets or sets the indices making up this submesh. Use the topology property to find out whether the submesh contains triangles or quads. |
submeshIndex | Gets or sets the index in the sharedMaterials array that this submesh aligns with. |
topology | Gets or sets the topology (whether this submesh is made with triangles or quads). |
Methods
Name | Description |
---|---|
GetSubmeshes(IEnumerable<Face>, int, MeshTopology) | Creates an array of submeshes from a set of faces. Currently only Quads and Triangles are supported. |
ToString() | Returns a string that represents this Submesh. |