firstVertex
First vertex in the index buffer for this sub-mesh.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Property
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public int firstVertex { readonly get; set; }
Remarks
Together with SubMeshDescriptor.vertexCount, this defines the range of vertices that are possibly used by this sub-mesh. These values are important for any CPU-based mesh processing that would be done, for example dynamic batching or CPU skinning.
The SubMeshDescriptor.bounds, SubMeshDescriptor.firstVertex and SubMeshDescriptor.vertexCount values are calculated automatically by Mesh.SetSubMesh, unless MeshUpdateFlags.DontRecalculateBounds flag is passed.
Additional Resources: SubMeshDescriptor.vertexCount.