Method Optimize
Optimize(ProBuilderMesh, bool)
Optimizes the mesh geometry, and generates a UV2 channel if object is marked as ContributeGI
or you set the generateLightmapUVs
parameter to true.
Declaration
public static void Optimize(this ProBuilderMesh mesh, bool generateLightmapUVs = false)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The ProBuilder mesh component to optimize. |
bool | generateLightmapUVs | True to force ProBuilder to build UV2s if the Auto UV2 preference is disabled. |
Remarks
This is only applicable to meshes with triangle topology. Quad meshes are not affected by this function.