MeshFilterExtensions.CombineMeshes

Extension Method in MeshFilterExtensions

Declaration

public static Mesh CombineMeshes(this MeshFilter[] filters, string combinedMeshName = "Combined Mesh", bool optimizeMesh = true, bool recalculateBounds = true)

Description

Combines the meshes of the mesh filters into one mesh.

Parameters

filtersThe mesh filters to combine.
combinedMeshNameThe name of the new combined mesh.
optimizeMeshOptimizes the combined mesh data to improve rendering performance.
recalculateBoundsRecalculates the bounding volume of the combined mesh.

Returns

MeshThe combined mesh.