How to use FMeshUtilities?

Hi,

Since 4.15 we can use the function:

void FMeshUtilities::ConvertActorMeshesToStaticMesh(const TArray<AActor*> InActors)

from UE4.15\Engine\Source\Developer\MeshUtilities\Private\MeshUtilities.cpp

This function is callable from UI Editor. I would like to use it in play, in a special map call only in editor to generate the miniature of my actors.

I didn’t succeed to include the file MeshUtilities.cpp and cannot call the function from my project.

Thx for the help

My goal is to use the function “ConvertActorsToStaticMesh” which can be found in UiAction list in a script.

  1. Call the function
void FMeshUtilities::ConvertActorMeshesToStaticMesh(const TArray<AActor*> InActors)
  1. Save the NewStaticMesh in an asset at a speficied location in my project folder

Is that possible ?

Solved:

#include "MeshUtilities.h"

void Func()
{
	IMeshUtilities& MeshUtilities = FModuleManager::Get().LoadModuleChecked<IMeshUtilities>("MeshUtilities");
}