GenerateMeshLods
Creates automatic Mesh LOD for a given mesh.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
GenerateMeshLods(Mesh, int)
Creates automatic Mesh LOD for a given mesh.
public static void GenerateMeshLods(Mesh mesh, int meshLodLimit = -1)
Parameters
Mesh to generate LODs for.
The maximum number of LOD levels to generate. If the value is 0, the method does not generate any extra LOD levels in addition to the original mesh. If the value is negative, the generation process stops when the next Mesh LOD level has around 64 indices.
GenerateMeshLods(Mesh, LodGenerationFlags, int)
Creates automatic Mesh LOD for a given mesh.
public static void GenerateMeshLods(Mesh mesh, MeshLodUtility.LodGenerationFlags flags, int meshLodLimit = -1)
Parameters
Mesh to generate LODs for.
Mesh Generation settings.
The maximum number of LOD levels to generate. If the value is 0, the method does not generate any extra LOD levels in addition to the original mesh. If the value is negative, the generation process stops when the next Mesh LOD level has around 64 indices.