ドキュメント

Unity Engine

Unity Engine

SubMeshDescriptor

Contains information about a single sub-mesh of a Mesh.
読み終わるまでの所要時間 2 分最終更新 1ヶ月前

Definition

public struct SubMeshDescriptor

Remarks

Simple usage of Mesh scripting API involves using functions like Mesh.triangles, Mesh.vertices and so on.
For advanced use cases that require maximum performance, you can use the advanced API, which has functions like Mesh.SetSubMesh, Mesh.SetIndexBufferParams, and Mesh.SetIndexBufferData. This advanced API gives access to the underlying mesh data structures that primarily work on raw index buffers, vertex buffers and mesh subset data.
A single sub-mesh represents part of the Mesh that is using one material. Many Meshes use just one material, but some might use more. Information in a sub-mesh is composed of:

Constructors

Constructor

Description

SubMeshDescriptor(System.Int32,System.Int32,UnityEngine.MeshTopology)Create a submesh descriptor.

Properties

Property

Description

baseVertexOffset that is added to each value in the index buffer, to compute the final vertex index.
boundsBounding box of vertices in local space.
firstVertexFirst vertex in the index buffer for this sub-mesh.
indexCountIndex count for this sub-mesh face data.
indexStartStarting point inside the whole Mesh index buffer where the face index data is found.
topologyFace topology of this sub-mesh.
vertexCountNumber of vertices used by the index buffer of this sub-mesh.