/Engine/Source/Developer/MaterialUtilities/Public/MaterialUtilities.h
Remaps material indices where possible to reduce the number of materials required for creating a proxy material
static void RemapUniqueMaterialIndices ( const [TArray](API\Runtime\Core\Containers\TArray)< struct [FSectionInfo](API\Runtime\Engine\Engine\FSectionInfo) > & InSections, const [TArray](API\Runtime\Core\Containers\TArray)< struct [FRawMeshExt](API\Developer\MeshMergeUtilities\FRawMeshExt) > & InMeshData, const [TMap](API\Runtime\Core\Containers\TMap)< FIntPoint, [TArray](API\Runtime\Core\Containers\TArray)< int32 > > & InMaterialMap, const [FMaterialProxySettings](API\Runtime\Engine\Engine\FMaterialProxySettings) & InMaterialProxySettings, const bool bBakeVertexData, const bool bMergeMaterials, [TArray](API\Runtime\Core\Containers\TArray)< bool > & OutMeshShouldBakeVertexData, [TMap](API\Runtime\Core\Containers\TMap)< FIntPoint, [TArray](API\Runtime\Core\Containers\TArray)< int32 > > & OutMaterialMap, [TArray](API\Runtime\Core\Containers\TArray)< struct [FSectionInfo](API\Runtime\Engine\Engine\FSectionInfo) > & OutSections )