DontRecalculateBounds
Indicates that Unity should not recalculate the bounds when you set Mesh data using Mesh.SetSubMesh.
Read time 1 minuteLast updated 9 days ago
Definition
- Type: Field
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
DontRecalculateBounds = 8
Remarks
When you use Mesh.SetSubMesh to modify a Mesh's data, Unity's default behaviour is to re-calculate the values of the SubMeshDescriptor.bounds, startVertex and SubMeshDescriptor.vertexCount fields from the current vertex and index buffer data.
You can make Unity skip these calculations by using the /MeshUpdateFlags.DontRecalculateBounds/ flag. This can be beneficial to performance, however if you use this flag you must make sure that you pass correct values of the , and fields.
boundsstartVertexvertexCountAdditional Resources: Mesh.SetSubMesh.