文档

Unity Engine

Unity Engine

DontValidateLodRanges

Use this value to disable the validation of Mesh LOD ranges when modifying mesh data.
阅读时间1 分钟最后更新于 1 个月前

Definition

DontValidateLodRanges = 16

Remarks

When you use SetLodData, Mesh.SetSubMesh, or Mesh.ApplyAndDisposeWritableMeshData to modify mesh data, Unity's default behavior is to validate the LOD ranges you provided. The validation checks for out-of-bounds index ranges, and Unity throws an exception if it finds any.
You can make Unity skip the validation by using this flag, which might improve performance. If you use this flag, make sure that you pass valid data to the mesh importer.
Additional Resources: SetLodData, Mesh.SetSubMesh, Mesh.ApplyAndDisposeWritableMeshData.